shithub: riscv

Download patch

ref: 1d81f7eacbe2db017f49cf5646c7671f0581f170
parent: 931ae0cfebeb46892406efc7468636e59f8110a9
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 */