[DCON] Fix DCON->VGA transition timing.
David Woodhouse
dwmw2 at infradead.org
Tue Nov 7 22:38:34 EST 2006
Commit: 46a2fdc3175238b296407f19a8741638bbba821b
Parent: 66261514c30ca0ed4304c843bea3f4a461ac8795
commit 46a2fdc3175238b296407f19a8741638bbba821b
Author: David Woodhouse <dwmw2 at infradead.org>
AuthorDate: Sat Nov 4 15:07:40 2006 +0800
Commit: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Sat Nov 4 15:07:40 2006 +0800
[DCON] Fix DCON->VGA transition timing.
The Geode takes up to 50-odd milliseconds to reinitialise the video
output hardware. We have to wait for it and _then_ enable video on the
next DCONBLNK pulse. Otherwise we'll get glitches in the output.
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
drivers/video/geode/gxfb_dcon.c | 5 +++++
drivers/video/geode/video_gx.c | 13 ++++++++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/drivers/video/geode/gxfb_dcon.c b/drivers/video/geode/gxfb_dcon.c
index 88abc38..936f3ac 100644
--- a/drivers/video/geode/gxfb_dcon.c
+++ b/drivers/video/geode/gxfb_dcon.c
@@ -78,6 +78,7 @@ static int dcon_switched;
static DECLARE_WAIT_QUEUE_HEAD(dcon_wait_queue);
extern int gxfb_powerdown(struct fb_info *info);
+extern int gxfb_pre_powerup(struct fb_info *info);
extern int gxfb_powerup(struct fb_info *info);
extern int (*gxfb_ioctl_func)(struct fb_info *, unsigned int, unsigned long);
@@ -162,6 +163,8 @@ static int dcon_set_source(int arg)
if (arg == DCON_SOURCE_CPU) {
/* FIXME: Set the task uninterruptable for this bit? */
+ /* Prepare to turn on the graphics engine */
+ gxfb_pre_powerup(fbinfo);
/* Enable the scanline interrupt bit */
dcon_write(DCON_REG_MODE, dcon_disp_mode | MODE_SCAN_INT);
@@ -591,10 +594,12 @@ static int dcon_interrupt(int irq, void
outl(1 << 7, gpio_base + GPIOx_NEGEDGE_STS);
if (dconstat == 2 || dconstat == 1) {
+#if 0
if (dconstat == 2)
printk("IRQ - switch to DCON mode\n");
else
printk("IRQ - switch to CPU mode\n");
+#endif
dcon_switched = 1;
wake_up(&dcon_wait_queue);
diff --git a/drivers/video/geode/video_gx.c b/drivers/video/geode/video_gx.c
index 87b1a1b..bcd319b 100644
--- a/drivers/video/geode/video_gx.c
+++ b/drivers/video/geode/video_gx.c
@@ -341,7 +341,8 @@ int gxfb_powerdown(struct fb_info *info)
return 0;
}
-int gxfb_powerup(struct fb_info *info) {
+int gxfb_pre_powerup(struct fb_info *info)
+{
struct geodefb_par *par = info->par;
@@ -351,6 +352,15 @@ int gxfb_powerup(struct fb_info *info) {
writel(gx_pm_regs[VC_VCFG], par->vid_regs + GX_VCFG);
writel(gx_pm_regs[VC_DCFG], par->vid_regs + GX_DCFG);
writel(gx_pm_regs[VC_FP_PM], par->vid_regs + GX_FP_PM);
+
+ msleep(50);
+ return 0;
+}
+
+int gxfb_powerup(struct fb_info *info)
+{
+ struct geodefb_par *par = info->par;
+
writel(gx_pm_regs[DC_DCFG], par->dc_regs + DC_DISPLAY_CFG);
/* Do this one last because it will turn on the FIFO which will start the line count */
@@ -423,5 +433,6 @@ struct geode_vid_ops gx_vid_ops = {
/* We define these as special hooks for the DCON driver to hook into */
EXPORT_SYMBOL(gxfb_powerdown);
+EXPORT_SYMBOL(gxfb_pre_powerup);
EXPORT_SYMBOL(gxfb_powerup);
More information about the Commits-kernel
mailing list