]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/msm/dpu: pull the is_cmd_mode out of _dpu_encoder_update_vsync_source()
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 13 Jun 2024 17:05:07 +0000 (20:05 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Mon, 24 Jun 2024 16:41:05 +0000 (19:41 +0300)
Setting vsync source makes sense only for DSI CMD panels. Pull the
is_cmd_mode condition out of the function into the calling code, so that
it becomes more explicit.

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Patchwork: https://patchwork.freedesktop.org/patch/598736/
Link: https://lore.kernel.org/r/20240613-dpu-handle-te-signal-v2-4-67a0116b5366@linaro.org
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c

index 93d0cd2482e51f0f87a2b92f982927bdca048690..9bf2ba53428ecf89771d67269440c0db92242fd7 100644 (file)
@@ -736,8 +736,7 @@ static void _dpu_encoder_update_vsync_source(struct dpu_encoder_virt *dpu_enc,
                return;
        }
 
-       if (hw_mdptop->ops.setup_vsync_source &&
-                       disp_info->is_cmd_mode) {
+       if (hw_mdptop->ops.setup_vsync_source) {
                for (i = 0; i < dpu_enc->num_phys_encs; i++)
                        vsync_cfg.ppnumber[i] = dpu_enc->hw_pp[i]->idx;
 
@@ -1228,7 +1227,8 @@ static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc)
                dpu_enc->cur_master->hw_mdptop->ops.intf_audio_select(
                        dpu_enc->cur_master->hw_mdptop);
 
-       _dpu_encoder_update_vsync_source(dpu_enc, &dpu_enc->disp_info);
+       if (dpu_enc->disp_info.is_cmd_mode)
+               _dpu_encoder_update_vsync_source(dpu_enc, &dpu_enc->disp_info);
 
        if (dpu_enc->disp_info.intf_type == INTF_DSI &&
                        !WARN_ON(dpu_enc->num_phys_encs == 0)) {