[PATCH] video: mipi_dbi: don't send image before initialization

Sven Püschel s.pueschel at pengutronix.de
Tue Dec 10 00:04:03 PST 2024


Don't send an image to the display before it is initialized, as it can
cause a broken image being stored in the display memory and being shown
while initializing. Instead just damage the image in the flush call but
avoid writing the actual image.

This problem was experienced with a ILI9341 LCD driver and calling the
splash command before enabling the framebuffer. The splash command flushed
out the data, but given no initialization, they were misinterpreted.
After enabling the display, it displayed the broken image for a short time
before being updated. This caused a flickering effect for the viewer.
Switching the command ordering also fixes the problem, but sends an black
image before the actual splash image.

Co-developed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
Signed-off-by: Sven Püschel <s.pueschel at pengutronix.de>
---
 drivers/video/mipi_dbi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/video/mipi_dbi.c b/drivers/video/mipi_dbi.c
index 9611a402d1..c202ecc1c7 100644
--- a/drivers/video/mipi_dbi.c
+++ b/drivers/video/mipi_dbi.c
@@ -366,6 +366,9 @@ void mipi_dbi_fb_flush(struct fb_info *info)
 		dbidev->damage.y2 = info->yres;
 	}
 
+	if (!info->enabled)
+		return;
+
 	mipi_dbi_fb_dirty(dbidev, info, &dbidev->damage);
 }
 EXPORT_SYMBOL(mipi_dbi_fb_flush);
-- 
2.39.5




More information about the barebox mailing list