Skip to content

Commit 57d6ca4

Browse files
Paloma Arellanolumag
authored andcommitted
drm/msm/dpu: modify timing engine programming for YUV420 over DP
Adjust the encoder timing engine setup programming in the case of video mode for YUV420 over DP to accommodate CDM. Changes in v3: - Move drm_display_mode's hskew division to another patch - Minor cleanup Changes in v2: - Move timing engine programming to this patch Signed-off-by: Paloma Arellano <quic_parellan@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/579634/ Link: https://lore.kernel.org/r/20240222194025.25329-18-quic_parellan@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
1 parent b40c837 commit 57d6ca4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
236236
struct drm_display_mode mode;
237237
struct dpu_hw_intf_timing_params timing_params = { 0 };
238238
const struct dpu_format *fmt = NULL;
239-
u32 fmt_fourcc = DRM_FORMAT_RGB888;
239+
u32 fmt_fourcc;
240240
unsigned long lock_flags;
241241
struct dpu_hw_intf_cfg intf_cfg = { 0 };
242242

@@ -255,7 +255,9 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
255255
DPU_DEBUG_VIDENC(phys_enc, "enabling mode:\n");
256256
drm_mode_debug_printmodeline(&mode);
257257

258-
if (phys_enc->split_role != ENC_ROLE_SOLO) {
258+
fmt_fourcc = dpu_encoder_get_drm_fmt(phys_enc);
259+
260+
if (phys_enc->split_role != ENC_ROLE_SOLO || fmt_fourcc == DRM_FORMAT_YUV420) {
259261
mode.hdisplay >>= 1;
260262
mode.htotal >>= 1;
261263
mode.hsync_start >>= 1;
@@ -275,6 +277,8 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
275277
fmt = dpu_get_dpu_format(fmt_fourcc);
276278
DPU_DEBUG_VIDENC(phys_enc, "fmt_fourcc 0x%X\n", fmt_fourcc);
277279

280+
if (phys_enc->hw_cdm)
281+
intf_cfg.cdm = phys_enc->hw_cdm->idx;
278282
intf_cfg.intf = phys_enc->hw_intf->idx;
279283
intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_VID;
280284
intf_cfg.stream_sel = 0; /* Don't care value for video mode */

0 commit comments

Comments
 (0)