diff options
author | Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> | 2022-07-12 16:38:41 +0000 |
---|---|---|
committer | Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> | 2022-07-12 16:38:41 +0000 |
commit | 62a4e64d31cc681e891967656dc8fa22cba1eb87 (patch) | |
tree | f5a55ad538925e2f07131a9649b760db3722c4a4 /sys/src/9/imx8 | |
parent | 76f8d642eeb77fd9fbfcf98189bcdbffb229d3d1 (diff) |
imx8: fix reduced lcdif pix clk workaround by enabling underflow recovery
Diffstat (limited to 'sys/src/9/imx8')
-rw-r--r-- | sys/src/9/imx8/lcd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/src/9/imx8/lcd.c b/sys/src/9/imx8/lcd.c index e69f6ff96..fbe0d65b4 100644 --- a/sys/src/9/imx8/lcd.c +++ b/sys/src/9/imx8/lcd.c @@ -461,7 +461,10 @@ lcdifinit(struct video_mode *mode) wr(lcdif, LCDIF_CTRL1_SET, CTRL1_FIFO_CLEAR); wr(lcdif, LCDIF_AS_CTRL, 0); - wr(lcdif, LCDIF_CTRL1, sm(7, CTRL1_BYTE_PACKING_FORMAT)); + /* enable underflow recovery to fix image shift */ + wr(lcdif, LCDIF_CTRL1, + sm(7, CTRL1_BYTE_PACKING_FORMAT) | + CTRL1_RECOVER_ON_UNDERFLOW); wr(lcdif, LCDIF_CTRL, CTRL_BYPASS_COUNT | @@ -911,12 +914,8 @@ lcdinit(void) goto out; } - /* - * start the pixel clock. running at the actual pixel clock - * causes the screen to shift horizontally after a while. - * using 80% seems to fix it - for now. - */ - setclkrate("lcdif.pix_clk", "system_pll1_clk", (mode.pixclk*8)/10); + /* start the pixel clock */ + setclkrate("lcdif.pix_clk", "system_pll1_clk", mode.pixclk); dpiinit(&mode); /* release dpi reset */ |