diff mbox series

[2/8] video: dw_mipi_dsi: Fix hsync/vsync settings

Message ID 20230522214708.3886796-3-megi@xff.cz
State Accepted
Commit e62f2a622b4c4f8ecd9939a2afbfed5ad02e047c
Delegated to: Anatolij Gustschin
Headers show
Series Some fixes for the rockchip dw_mipi_dsi driver | expand

Commit Message

Ondřej Jirman May 22, 2023, 9:47 p.m. UTC
From: Ondrej Jirman <megi@xff.cz>

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 horizobnntally and vertivally by back porch
distance).

Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 drivers/video/dw_mipi_dsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c
index 92e388ac1e42..22fef7e8825f 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));