On Sat, Nov 08, 2025 at 12:04:10AM +0100, Marek Vasut wrote:
> Since commit 94fe479fae96 ("drm/rcar-du: dsi: Clean up handling of DRM mode
> flags")
> the driver does not set TXVMVPRMSET0R_VSPOL_LOW and TXVMVPRMSET0R_HSPOL_LOW
> for modes which set neither DRM_MODE_FLAG_[PN].SYNC.
Could you please explain what broke ? What panel are you using ?
> The previous behavior
> was to assume that neither flag means DRM_MODE_FLAG_N.SYNC . Restore the
> previous behavior for maximum compatibility.
>
> Fixes: 94fe479fae96 ("drm/rcar-du: dsi: Clean up handling of DRM mode flags")
> Signed-off-by: Marek Vasut <[email protected]>
> ---
> Cc: David Airlie <[email protected]>
> Cc: Geert Uytterhoeven <[email protected]>
> Cc: Kieran Bingham <[email protected]>
> Cc: Laurent Pinchart <[email protected]>
> Cc: Maarten Lankhorst <[email protected]>
> Cc: Magnus Damm <[email protected]>
> Cc: Maxime Ripard <[email protected]>
> Cc: Simona Vetter <[email protected]>
> Cc: Thomas Zimmermann <[email protected]>
> Cc: Tomi Valkeinen <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> ---
> drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
> b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
> index 9413b76d0bfce..98bd7f40adbea 100644
> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
> @@ -492,9 +492,11 @@ static void rcar_mipi_dsi_set_display_timing(struct
> rcar_mipi_dsi *dsi,
>
> /* Configuration for Video Parameters, input is always RGB888 */
> vprmset0r = TXVMVPRMSET0R_BPP_24;
> - if (mode->flags & DRM_MODE_FLAG_NVSYNC)
> + if ((mode->flags & DRM_MODE_FLAG_NVSYNC) ||
> + !(mode->flags & DRM_MODE_FLAG_PVSYNC))
> vprmset0r |= TXVMVPRMSET0R_VSPOL_LOW;
I don't think this restores the previous behaviour. You would need to
write
if (!(mode->flags & DRM_MODE_FLAG_PVSYNC))
vprmset0r |= TXVMVPRMSET0R_VSPOL_LOW;
> - if (mode->flags & DRM_MODE_FLAG_NHSYNC)
> + if ((mode->flags & DRM_MODE_FLAG_NHSYNC) ||
> + !(mode->flags & DRM_MODE_FLAG_PHSYNC))
> vprmset0r |= TXVMVPRMSET0R_HSPOL_LOW;
Same here.
>
> vprmset1r = TXVMVPRMSET1R_VACTIVE(mode->vdisplay)
--
Regards,
Laurent Pinchart