From: Ondrej Jirman Date: Mon, 22 May 2023 21:47:02 +0000 (+0200) Subject: video: dw_mipi_dsi: Fix hsync/vsync settings X-Git-Tag: v2025.01-rc5-pxa1908~939^2~6 X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=e62f2a622b4c4f8ecd9939a2afbfed5ad02e047c;p=u-boot.git video: dw_mipi_dsi: Fix hsync/vsync settings These must be read from timings->flags, like other DSI HOST drivers do. And they must not be inverted either. Low means low. Without this fix, panel drivers that set *SYNC_LOW produce corrupted output on screen (shifted horizontally and vertically by back porch distance). Signed-off-by: Ondrej Jirman --- diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index 92e388ac1e..22fef7e882 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -538,9 +538,9 @@ static void dw_mipi_dsi_dpi_config(struct dw_mipi_dsi *dsi, break; } - if (device->mode_flags & DISPLAY_FLAGS_VSYNC_HIGH) + if (timings->flags & DISPLAY_FLAGS_VSYNC_LOW) val |= VSYNC_ACTIVE_LOW; - if (device->mode_flags & DISPLAY_FLAGS_HSYNC_HIGH) + if (timings->flags & DISPLAY_FLAGS_HSYNC_LOW) val |= HSYNC_ACTIVE_LOW; dsi_write(dsi, DSI_DPI_VCID, DPI_VCID(dsi->channel));