Skip to content

Commit 478306e

Browse files
committed
drm/tidss: Use the crtc_* timings when programming the HW
Use the crtc_* fields from drm_display_mode, instead of the "logical" fields. This shouldn't change anything in practice, but afaiu the crtc_* fields are the correct ones to use here. Reviewed-by: Aradhya Bhatia <aradhya.bhatia@linux.dev> Tested-by: Parth Pancholi <parth.pancholi@toradex.com> Tested-by: Jayesh Choudhary <j-choudhary@ti.com> Reviewed-by: Devarsh Thakkar <devarsht@ti.com> Link: https://lore.kernel.org/r/20250723-cdns-dsi-impro-v5-3-e61cc06074c2@ideasonboard.com Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
1 parent f7e831d commit 478306e

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

drivers/gpu/drm/tidss/tidss_crtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static void tidss_crtc_atomic_enable(struct drm_crtc *crtc,
225225
tidss_runtime_get(tidss);
226226

227227
r = dispc_vp_set_clk_rate(tidss->dispc, tcrtc->hw_videoport,
228-
mode->clock * 1000);
228+
mode->crtc_clock * 1000);
229229
if (r != 0)
230230
return;
231231

drivers/gpu/drm/tidss/tidss_dispc.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,13 +1215,13 @@ void dispc_vp_enable(struct dispc_device *dispc, u32 hw_videoport,
12151215

12161216
dispc_set_num_datalines(dispc, hw_videoport, fmt->data_width);
12171217

1218-
hfp = mode->hsync_start - mode->hdisplay;
1219-
hsw = mode->hsync_end - mode->hsync_start;
1220-
hbp = mode->htotal - mode->hsync_end;
1218+
hfp = mode->crtc_hsync_start - mode->crtc_hdisplay;
1219+
hsw = mode->crtc_hsync_end - mode->crtc_hsync_start;
1220+
hbp = mode->crtc_htotal - mode->crtc_hsync_end;
12211221

1222-
vfp = mode->vsync_start - mode->vdisplay;
1223-
vsw = mode->vsync_end - mode->vsync_start;
1224-
vbp = mode->vtotal - mode->vsync_end;
1222+
vfp = mode->crtc_vsync_start - mode->crtc_vdisplay;
1223+
vsw = mode->crtc_vsync_end - mode->crtc_vsync_start;
1224+
vbp = mode->crtc_vtotal - mode->crtc_vsync_end;
12251225

12261226
dispc_vp_write(dispc, hw_videoport, DISPC_VP_TIMING_H,
12271227
FLD_VAL(hsw - 1, 7, 0) |
@@ -1263,8 +1263,8 @@ void dispc_vp_enable(struct dispc_device *dispc, u32 hw_videoport,
12631263
FLD_VAL(ivs, 12, 12));
12641264

12651265
dispc_vp_write(dispc, hw_videoport, DISPC_VP_SIZE_SCREEN,
1266-
FLD_VAL(mode->hdisplay - 1, 11, 0) |
1267-
FLD_VAL(mode->vdisplay - 1, 27, 16));
1266+
FLD_VAL(mode->crtc_hdisplay - 1, 11, 0) |
1267+
FLD_VAL(mode->crtc_vdisplay - 1, 27, 16));
12681268

12691269
VP_REG_FLD_MOD(dispc, hw_videoport, DISPC_VP_CONTROL, 1, 0, 0);
12701270
}

0 commit comments

Comments
 (0)