From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: "Antonino A. Daplas" <adaplas@gmail.com>,
linux-fbdev-devel@lists.sourceforge.net
Cc: Anti Sullin <anti.sullin@artecdesign.ee>,
Patrice Vilchez <patrice.vilchez@atmel.com>,
Andrew Victor <linux@maxim.org.za>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] atmel_lcdfb: LCDC startup fix
Date: Fri, 23 Nov 2007 16:12:22 +0100 [thread overview]
Message-ID: <4746EDD6.6060301@atmel.com> (raw)
From: Anti Sullin <anti.sullin@artecdesign.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@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>
---
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)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
reply other threads:[~2007-11-23 15:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4746EDD6.6060301@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=adaplas@gmail.com \
--cc=anti.sullin@artecdesign.ee \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@maxim.org.za \
--cc=patrice.vilchez@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).