]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/msm/dpu: encoder: drop unused mode_fixup callback
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 17 Feb 2022 03:53:56 +0000 (06:53 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 18 Feb 2022 17:15:12 +0000 (20:15 +0300)
Both cmd and vid backends provide useless mode_fixup() callback. Drop
it.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220217035358.465904-6-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c

index 3d5fd73950f16189d69db2958616bd8b86b0f0c3..c7eb070bd44e4a56ce0695d9fe5deae1407454ca 100644 (file)
@@ -582,10 +582,6 @@ static int dpu_encoder_virt_atomic_check(
                if (phys->ops.atomic_check)
                        ret = phys->ops.atomic_check(phys, crtc_state,
                                        conn_state);
-               else if (phys->ops.mode_fixup)
-                       if (!phys->ops.mode_fixup(phys, mode, adj_mode))
-                               ret = -EINVAL;
-
                if (ret) {
                        DPU_ERROR_ENC(dpu_enc,
                                        "mode unsupported, phys idx %d\n", i);
index 42febfce79c733ec42f6853e541f3128efe27451..6eb2eb4ecb3d694139ca9085acb53a2a1f8aef21 100644 (file)
@@ -84,7 +84,6 @@ struct dpu_encoder_virt_ops {
  * @is_master:                 Whether this phys_enc is the current master
  *                             encoder. Can be switched at enable time. Based
  *                             on split_role and current mode (CMD/VID).
- * @mode_fixup:                        DRM Call. Fixup a DRM mode.
  * @mode_set:                  DRM Call. Set a DRM mode.
  *                             This likely caches the mode, for use at enable.
  * @enable:                    DRM Call. Enable a DRM mode.
@@ -114,9 +113,6 @@ struct dpu_encoder_phys_ops {
                        struct dentry *debugfs_root);
        void (*prepare_commit)(struct dpu_encoder_phys *encoder);
        bool (*is_master)(struct dpu_encoder_phys *encoder);
-       bool (*mode_fixup)(struct dpu_encoder_phys *encoder,
-                       const struct drm_display_mode *mode,
-                       struct drm_display_mode *adjusted_mode);
        void (*mode_set)(struct dpu_encoder_phys *encoder,
                        struct drm_display_mode *mode,
                        struct drm_display_mode *adjusted_mode);
index 7d2beea9cc4e86b155085ac782f520026e4fcc60..96b9d57b8b6cfa8bf8bffc7be9b5d8aae5ef4930 100644 (file)
@@ -45,15 +45,6 @@ static bool dpu_encoder_phys_cmd_is_master(struct dpu_encoder_phys *phys_enc)
        return (phys_enc->split_role != ENC_ROLE_SLAVE);
 }
 
-static bool dpu_encoder_phys_cmd_mode_fixup(
-               struct dpu_encoder_phys *phys_enc,
-               const struct drm_display_mode *mode,
-               struct drm_display_mode *adj_mode)
-{
-       DPU_DEBUG_CMDENC(to_dpu_encoder_phys_cmd(phys_enc), "\n");
-       return true;
-}
-
 static void _dpu_encoder_phys_cmd_update_intf_cfg(
                struct dpu_encoder_phys *phys_enc)
 {
@@ -725,7 +716,6 @@ static void dpu_encoder_phys_cmd_init_ops(
        ops->prepare_commit = dpu_encoder_phys_cmd_prepare_commit;
        ops->is_master = dpu_encoder_phys_cmd_is_master;
        ops->mode_set = dpu_encoder_phys_cmd_mode_set;
-       ops->mode_fixup = dpu_encoder_phys_cmd_mode_fixup;
        ops->enable = dpu_encoder_phys_cmd_enable;
        ops->disable = dpu_encoder_phys_cmd_disable;
        ops->destroy = dpu_encoder_phys_cmd_destroy;
index db6a9b896e4263d0e7a761225b73d0fd5b2fa94a..7e837ca63095fceca82c2c4d9c2a7c8f505fd1fb 100644 (file)
@@ -225,19 +225,6 @@ static void programmable_fetch_config(struct dpu_encoder_phys *phys_enc,
        spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags);
 }
 
-static bool dpu_encoder_phys_vid_mode_fixup(
-               struct dpu_encoder_phys *phys_enc,
-               const struct drm_display_mode *mode,
-               struct drm_display_mode *adj_mode)
-{
-       DPU_DEBUG_VIDENC(phys_enc, "\n");
-
-       /*
-        * Modifying mode has consequences when the mode comes back to us
-        */
-       return true;
-}
-
 static void dpu_encoder_phys_vid_setup_timing_engine(
                struct dpu_encoder_phys *phys_enc)
 {
@@ -669,7 +656,6 @@ static void dpu_encoder_phys_vid_init_ops(struct dpu_encoder_phys_ops *ops)
 {
        ops->is_master = dpu_encoder_phys_vid_is_master;
        ops->mode_set = dpu_encoder_phys_vid_mode_set;
-       ops->mode_fixup = dpu_encoder_phys_vid_mode_fixup;
        ops->enable = dpu_encoder_phys_vid_enable;
        ops->disable = dpu_encoder_phys_vid_disable;
        ops->destroy = dpu_encoder_phys_vid_destroy;