[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4746EDD6.6060301@atmel.com>
Date: Fri, 23 Nov 2007 16:12:22 +0100
From: Nicolas Ferre <nicolas.ferre@...el.com>
To: "Antonino A. Daplas" <adaplas@...il.com>,
linux-fbdev-devel@...ts.sourceforge.net
CC: Andrew Victor <linux@...im.org.za>,
Patrice Vilchez <patrice.vilchez@...el.com>,
Haavard Skinnemoen <hskinnemoen@...el.com>,
Anti Sullin <anti.sullin@...ecdesign.ee>,
Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: [PATCH] atmel_lcdfb: LCDC startup fix
From: Anti Sullin <anti.sullin@...ecdesign.ee>
This patch adds an additional loop, that delays turning off the DMA
until the LCDC core has been turned off. This prevents the picture
to be shifted some random length when the kernel re-initializes
the LCDC.
Signed-off-by: Anti Sullin <anti.sullin@...ecdesign.ee>
Signed-off-by: Andrew Victor <andrew@...people.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@...el.com>
Acked-by: Haavard Skinnemoen <hskinnemoen@...el.com>
---
Without this patch, the LCDC keeps running for some small time
after the PWRCON:LCD_PWR has been cleared ; the FIFO suffers
an underrun and on re-starting the LCDC the FIFO data
stays shifted.
This behavior has been seen and fixed on AT91SAM9261-EK and
two custom AT91SAM9261 boards, all of them having different
LCD panels.
Thanks a lot to Anti Sullin for submitting this patch (long
time ago).
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -268,6 +268,10 @@
/* Turn off the LCD controller and the DMA controller */
lcdc_writel(sinfo, ATMEL_LCDC_PWRCON, sinfo->guard_time << ATMEL_LCDC_GUARDT_OFFSET);
+ /* Wait for the LCDC core to become idle */
+ while (lcdc_readl(sinfo, ATMEL_LCDC_PWRCON) & ATMEL_LCDC_BUSY)
+ msleep(10);
+
lcdc_writel(sinfo, ATMEL_LCDC_DMACON, 0);
if (info->var.bits_per_pixel == 1)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists