]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/bridge: cdns-dsi: Use pre_enable/post_disable to enable/disable
authorAradhya Bhatia <a-bhatia1@ti.com>
Thu, 5 Jun 2025 17:15:24 +0000 (22:45 +0530)
committerMaxime Ripard <mripard@kernel.org>
Fri, 6 Jun 2025 12:24:57 +0000 (14:24 +0200)
commit3e4e1f2543c060cd8cf8ededc68ea50c49b4b28a
treef87a6a075ace099ad12fdca5a5169549b7003be6
parentc9b1150a68d9362a0827609fc0dc1664c0d8bfe1
drm/bridge: cdns-dsi: Use pre_enable/post_disable to enable/disable

The cdns-dsi controller requires that it be turned on completely before
the input DPI's source has begun streaming[0]. Not having that, allows
for a small window before cdns-dsi enable and after cdns-dsi disable
where the previous entity (in this case tidss's videoport) to continue
streaming DPI video signals. This small window where cdns-dsi is
disabled but is still receiving signals causes the input FIFO of
cdns-dsi to get corrupted. This causes the colors to shift on the output
display. The colors can either shift by one color component (R->G, G->B,
B->R), or by two color components (R->B, G->R, B->G).

Since tidss's videoport starts streaming via crtc enable hooks, we need
cdns-dsi to be up and running before that. Now that the bridges are
pre_enabled before crtc is enabled, and post_disabled after crtc is
disabled, use the pre_enable and post_disable hooks to get cdns-dsi
ready and running before the tidss videoport to get pass the color shift
issues.

[0]: See section 12.6.5.7.3 "Start-up Procedure" in J721E SoC TRM
Link: http://www.ti.com/lit/pdf/spruil1
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
Signed-off-by: Aradhya Bhatia <aradhya.bhatia@linux.dev>
Tested-by: Devarsh Thakkar <devarsht@ti.com>
Link: https://lore.kernel.org/r/20250605171524.27222-5-aradhya.bhatia@linux.dev
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c