Skip to content

Commit 57b290c

Browse files
kbinghamLaurent Pinchart
authored andcommitted
drm: rcar-du: crtc: Support external DSI dot clock
On platforms with an external clock, both the group and crtc must be handled accordingly to correctly pass through the external clock and configure the DU to use the external rate. The CRTC support was missed while adding the DSI support on the r8a779a0 which led to the output clocks being incorrectly determined. Ensure that when a CRTC is routed through the DSI encoder, the external clock is used without any further divider being applied. Fixes: b291fdc ("drm: rcar-du: Add r8a779a0 device support") Signed-off-by: Kieran Bingham <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]>
1 parent e0e4c64 commit 57b290c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/gpu/drm/rcar-du/rcar_du_crtc.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,13 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
262262
rcar_du_group_write(rcrtc->group, DPLLCR, dpllcr);
263263

264264
escr = ESCR_DCLKSEL_DCLKIN | div;
265-
} else if (rcdu->info->lvds_clk_mask & BIT(rcrtc->index)) {
265+
} else if (rcdu->info->lvds_clk_mask & BIT(rcrtc->index) ||
266+
rcdu->info->dsi_clk_mask & BIT(rcrtc->index)) {
266267
/*
267-
* Use the LVDS PLL output as the dot clock when outputting to
268-
* the LVDS encoder on an SoC that supports this clock routing
269-
* option. We use the clock directly in that case, without any
270-
* additional divider.
268+
* Use the external LVDS or DSI PLL output as the dot clock when
269+
* outputting to the LVDS or DSI encoder on an SoC that supports
270+
* this clock routing option. We use the clock directly in that
271+
* case, without any additional divider.
271272
*/
272273
escr = ESCR_DCLKSEL_DCLKIN;
273274
} else {

0 commit comments

Comments
 (0)