aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/geode/video_gx.c
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2006-12-08 05:40:53 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:08 -0500
commitf378819a19e2b9639f17a1a82c5e12adc9512390 (patch)
treeef6278a50642f63d3ae1667fe33e92fb78536f5b /drivers/video/geode/video_gx.c
parent4c1979c8963528cc6f52203ae62162ed22e171f4 (diff)
[PATCH] gxfb: Fixups for the AMD Geode GX framebuffer driver
We cannot assume that the BIOS will be correctly setting up the hardware, so set some bits in various display registers to enable video output. Allow an advanced user to specify a frambuffer size, rather then probing the BIOS. All of these fixes were prompted by the OLPC effort. [akpm@osdl.org: cleanups] Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/geode/video_gx.c')
-rw-r--r--drivers/video/geode/video_gx.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/video/geode/video_gx.c b/drivers/video/geode/video_gx.c
index 2b2a7880ea75..616ce339c5fa 100644
--- a/drivers/video/geode/video_gx.c
+++ b/drivers/video/geode/video_gx.c
@@ -178,7 +178,21 @@ static void gx_set_dclk_frequency(struct fb_info *info)
178static void gx_configure_display(struct fb_info *info) 178static void gx_configure_display(struct fb_info *info)
179{ 179{
180 struct geodefb_par *par = info->par; 180 struct geodefb_par *par = info->par;
181 u32 dcfg, fp_pm; 181 u32 dcfg, fp_pm, misc;
182
183 /* Set up the MISC register */
184
185 misc = readl(par->vid_regs + GX_MISC);
186
187 /* Power up the DAC */
188 misc &= ~(GX_MISC_A_PWRDN | GX_MISC_DAC_PWRDN);
189
190 /* Disable gamma correction */
191 misc |= GX_MISC_GAM_EN;
192
193 writel(misc, par->vid_regs + GX_MISC);
194
195 /* Write the display configuration */
182 196
183 dcfg = readl(par->vid_regs + GX_DCFG); 197 dcfg = readl(par->vid_regs + GX_DCFG);
184 198
@@ -199,9 +213,17 @@ static void gx_configure_display(struct fb_info *info)
199 if (info->var.sync & FB_SYNC_VERT_HIGH_ACT) 213 if (info->var.sync & FB_SYNC_VERT_HIGH_ACT)
200 dcfg |= GX_DCFG_CRT_VSYNC_POL; 214 dcfg |= GX_DCFG_CRT_VSYNC_POL;
201 215
216 /* Enable the display logic */
217 /* Set up the DACS to blank normally */
218
219 dcfg |= GX_DCFG_CRT_EN | GX_DCFG_DAC_BL_EN;
220
221 /* Enable the external DAC VREF? */
222
202 writel(dcfg, par->vid_regs + GX_DCFG); 223 writel(dcfg, par->vid_regs + GX_DCFG);
203 224
204 /* Power on flat panel. */ 225 /* Power on flat panel. */
226
205 fp_pm = readl(par->vid_regs + GX_FP_PM); 227 fp_pm = readl(par->vid_regs + GX_FP_PM);
206 fp_pm |= GX_FP_PM_P; 228 fp_pm |= GX_FP_PM_P;
207 writel(fp_pm, par->vid_regs + GX_FP_PM); 229 writel(fp_pm, par->vid_regs + GX_FP_PM);