diff options
author | Anti Sullin <anti.sullin@artecdesign.ee> | 2007-11-28 19:21:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-29 12:24:53 -0500 |
commit | e593f070b40887dc0415646a4c0720eb8630c722 (patch) | |
tree | 15c7213d85f345602b5a67d7e71c4416b649e6e7 /drivers/video | |
parent | 2868f89fc43d16441a90714d4676089bdfc4255a (diff) |
atmel_lcdfb: LCDC startup fix
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.
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).
Signed-off-by: Anti Sullin <anti.sullin@artecdesign.ee>
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 235b618b4117..11a3a222dfc3 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -268,6 +268,10 @@ static int atmel_lcdfb_set_par(struct fb_info *info) | |||
268 | /* Turn off the LCD controller and the DMA controller */ | 268 | /* Turn off the LCD controller and the DMA controller */ |
269 | lcdc_writel(sinfo, ATMEL_LCDC_PWRCON, sinfo->guard_time << ATMEL_LCDC_GUARDT_OFFSET); | 269 | lcdc_writel(sinfo, ATMEL_LCDC_PWRCON, sinfo->guard_time << ATMEL_LCDC_GUARDT_OFFSET); |
270 | 270 | ||
271 | /* Wait for the LCDC core to become idle */ | ||
272 | while (lcdc_readl(sinfo, ATMEL_LCDC_PWRCON) & ATMEL_LCDC_BUSY) | ||
273 | msleep(10); | ||
274 | |||
271 | lcdc_writel(sinfo, ATMEL_LCDC_DMACON, 0); | 275 | lcdc_writel(sinfo, ATMEL_LCDC_DMACON, 0); |
272 | 276 | ||
273 | if (info->var.bits_per_pixel == 1) | 277 | if (info->var.bits_per_pixel == 1) |