]> git.baikalelectronics.ru Git - kernel.git/commit
drm: rcar-du: Fix DSI enable & disable sequence
authorTomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Wed, 24 Aug 2022 12:47:25 +0000 (15:47 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 7 Sep 2022 20:48:42 +0000 (23:48 +0300)
commit31857d7753aae223ea690ffe8c2c0dcd4fa24f5e
tree9edc14e56ef057cbf474a384d264a5c126091672
parenta5cb96f619a0c9445ca2bb95538d7cc6aaa368bb
drm: rcar-du: Fix DSI enable & disable sequence

The rcar crtc depends on the clock provided from the rcar DSI bridge.
When the DSI bridge is disabled, the clock is stopped, which causes the
crtc disable to timeout.

Also, while I have no issue with the enable, the documentation suggests
to enable the DSI before the crtc so that the crtc has its clock enabled
at enable time. This is also not done by the current driver.

To fix this, we need to keep the DSI bridge enabled until the crtc has
disabled itself, and enable the DSI bridge before crtc enables itself.

Add functions rcar_mipi_dsi_pclk_enable and rcar_mipi_dsi_pclk_disable
to the rcar DSI bridge driver which the rcar driver can use to
enable/disable the DSI clock when needed.  This is similar to what is
already done with the rcar LVDS bridge.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c
drivers/gpu/drm/rcar-du/rcar_du_drv.h
drivers/gpu/drm/rcar-du/rcar_du_encoder.c
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.h [new file with mode: 0644]