git: 9front

Download patch

ref: fbc0b1f63460fd0ff0ff9f5d7c06bf5c5fd48b82
parent: 74e4cff29c288d1ffa62bebd09b922015d3b8c91
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jun 11 20:21:28 EDT 2022

imx8/lcd: silly work around for display instability

running at the actual pixel clock causes the screen
to shift horizontally after a while.

using 60% seems to fix it - for now.

--- a/sys/src/9/imx8/lcd.c
+++ b/sys/src/9/imx8/lcd.c
@@ -930,8 +930,12 @@
 		goto out;
 	}
 
-	/* start the pixel clock */
-	setclkrate("lcdif.pix_clk", "system_pll1_clk", mode.pixclk);
+	/*
+	 * start the pixel clock. running at the actual pixel clock
+	 * causes the screen to shift horizontally after a while.
+	 * using 60% seems to fix it - for now.
+	 */
+	setclkrate("lcdif.pix_clk", "system_pll1_clk", (mode.pixclk*6)/10);
 	dpiinit(&mode);
 
 	/* release dpi reset */
--