diff options
author | Jordan Crouse <jordan.crouse@amd.com> | 2008-04-28 05:14:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:35 -0400 |
commit | e2b118090969f153f134647acbcbbf01a9005e64 (patch) | |
tree | a795daaab57ea78635f736fc668b4fc313e562c4 /drivers/video/geode/video_gx.c | |
parent | f0a0c1f20f837221c0d990a54ae5426acf039036 (diff) |
gxfb: don't enable the CRT DACs when we are in flatpanel mode
When the FP strap is enabled, don't turn on the CRT DACs - that will save
about 35 mA of power.
Updated/cleaned up by Andres Salomon.
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Jordan Crouse <jordan.crouse@amd.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/geode/video_gx.c')
-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 */ |