diff options
-rw-r--r-- | drivers/video/geode/video_gx.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/video/geode/video_gx.c b/drivers/video/geode/video_gx.c index 06245a8400c7..cfe2c80b025d 100644 --- a/drivers/video/geode/video_gx.c +++ b/drivers/video/geode/video_gx.c | |||
@@ -239,18 +239,6 @@ static void gx_configure_display(struct fb_info *info) | |||
239 | struct geodefb_par *par = info->par; | 239 | struct geodefb_par *par = info->par; |
240 | u32 dcfg, misc; | 240 | u32 dcfg, misc; |
241 | 241 | ||
242 | /* Set up the MISC register */ | ||
243 | |||
244 | misc = readl(par->vid_regs + GX_MISC); | ||
245 | |||
246 | /* Power up the DAC */ | ||
247 | misc &= ~(GX_MISC_A_PWRDN | GX_MISC_DAC_PWRDN); | ||
248 | |||
249 | /* Disable gamma correction */ | ||
250 | misc |= GX_MISC_GAM_EN; | ||
251 | |||
252 | writel(misc, par->vid_regs + GX_MISC); | ||
253 | |||
254 | /* Write the display configuration */ | 242 | /* Write the display configuration */ |
255 | dcfg = readl(par->vid_regs + GX_DCFG); | 243 | dcfg = readl(par->vid_regs + GX_DCFG); |
256 | 244 | ||
@@ -269,14 +257,28 @@ static void gx_configure_display(struct fb_info *info) | |||
269 | /* Enable hsync and vsync. */ | 257 | /* Enable hsync and vsync. */ |
270 | dcfg |= GX_DCFG_HSYNC_EN | GX_DCFG_VSYNC_EN; | 258 | dcfg |= GX_DCFG_HSYNC_EN | GX_DCFG_VSYNC_EN; |
271 | 259 | ||
272 | /* Only change the sync polarities if we are running | 260 | misc = readl(par->vid_regs + GX_MISC); |
273 | * in CRT mode. The FP polarities will be handled in | 261 | |
274 | * gxfb_configure_tft */ | 262 | /* Disable gamma correction */ |
263 | misc |= GX_MISC_GAM_EN; | ||
264 | |||
275 | if (par->enable_crt) { | 265 | if (par->enable_crt) { |
266 | |||
267 | /* Power up the CRT DACs */ | ||
268 | misc &= ~(GX_MISC_A_PWRDN | GX_MISC_DAC_PWRDN); | ||
269 | writel(misc, par->vid_regs + GX_MISC); | ||
270 | |||
271 | /* Only change the sync polarities if we are running | ||
272 | * in CRT mode. The FP polarities will be handled in | ||
273 | * gxfb_configure_tft */ | ||
276 | if (!(info->var.sync & FB_SYNC_HOR_HIGH_ACT)) | 274 | if (!(info->var.sync & FB_SYNC_HOR_HIGH_ACT)) |
277 | dcfg |= GX_DCFG_CRT_HSYNC_POL; | 275 | dcfg |= GX_DCFG_CRT_HSYNC_POL; |
278 | if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT)) | 276 | if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT)) |
279 | dcfg |= GX_DCFG_CRT_VSYNC_POL; | 277 | dcfg |= GX_DCFG_CRT_VSYNC_POL; |
278 | } else { | ||
279 | /* Power down the CRT DACs if in FP mode */ | ||
280 | misc |= (GX_MISC_A_PWRDN | GX_MISC_DAC_PWRDN); | ||
281 | writel(misc, par->vid_regs + GX_MISC); | ||
280 | } | 282 | } |
281 | 283 | ||
282 | /* Enable the display logic */ | 284 | /* Enable the display logic */ |