]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit957fe62d7d15f43d49e8cbacafaff8ede7d6cb30
tree9edc14e56ef057cbf474a384d264a5c126091672
parent222abba69c620875c60b20cf77356f260d360ac8
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]