diff options
Diffstat (limited to 'drivers/video/geode')
-rw-r--r-- | drivers/video/geode/lxfb.h | 2 | ||||
-rw-r--r-- | drivers/video/geode/lxfb_ops.c | 28 |
2 files changed, 18 insertions, 12 deletions
diff --git a/drivers/video/geode/lxfb.h b/drivers/video/geode/lxfb.h index 3b9416f4ee20..6a51448fd3f7 100644 --- a/drivers/video/geode/lxfb.h +++ b/drivers/video/geode/lxfb.h @@ -51,8 +51,6 @@ static inline unsigned int lx_get_pitch(unsigned int xres, int bpp) } void lx_set_mode(struct fb_info *); -void lx_get_gamma(struct fb_info *, unsigned int *, int); -void lx_set_gamma(struct fb_info *, unsigned int *, int); unsigned int lx_framebuffer_size(void); int lx_blank_display(struct fb_info *, int); void lx_set_palette_reg(struct fb_info *, unsigned int, unsigned int, diff --git a/drivers/video/geode/lxfb_ops.c b/drivers/video/geode/lxfb_ops.c index aaef9165ec9b..b1cd49c99356 100644 --- a/drivers/video/geode/lxfb_ops.c +++ b/drivers/video/geode/lxfb_ops.c @@ -517,25 +517,25 @@ void lx_set_palette_reg(struct fb_info *info, unsigned regno, int lx_blank_display(struct fb_info *info, int blank_mode) { struct lxfb_par *par = info->par; - u32 dcfg, fp_pm; - int blank, hsync, vsync, crt; + u32 dcfg, misc, fp_pm; + int blank, hsync, vsync; /* CRT power saving modes. */ switch (blank_mode) { case FB_BLANK_UNBLANK: - blank = 0; hsync = 1; vsync = 1; crt = 1; + blank = 0; hsync = 1; vsync = 1; break; case FB_BLANK_NORMAL: - blank = 1; hsync = 1; vsync = 1; crt = 1; + blank = 1; hsync = 1; vsync = 1; break; case FB_BLANK_VSYNC_SUSPEND: - blank = 1; hsync = 1; vsync = 0; crt = 1; + blank = 1; hsync = 1; vsync = 0; break; case FB_BLANK_HSYNC_SUSPEND: - blank = 1; hsync = 0; vsync = 1; crt = 1; + blank = 1; hsync = 0; vsync = 1; break; case FB_BLANK_POWERDOWN: - blank = 1; hsync = 0; vsync = 0; crt = 0; + blank = 1; hsync = 0; vsync = 0; break; default: return -EINVAL; @@ -545,15 +545,23 @@ int lx_blank_display(struct fb_info *info, int blank_mode) dcfg &= ~(VP_DCFG_DAC_BL_EN | VP_DCFG_HSYNC_EN | VP_DCFG_VSYNC_EN | VP_DCFG_CRT_EN); if (!blank) - dcfg |= VP_DCFG_DAC_BL_EN; + dcfg |= VP_DCFG_DAC_BL_EN | VP_DCFG_CRT_EN; if (hsync) dcfg |= VP_DCFG_HSYNC_EN; if (vsync) dcfg |= VP_DCFG_VSYNC_EN; - if (crt) - dcfg |= VP_DCFG_CRT_EN; + write_vp(par, VP_DCFG, dcfg); + misc = read_vp(par, VP_MISC); + + if (vsync && hsync) + misc &= ~VP_MISC_DACPWRDN; + else + misc |= VP_MISC_DACPWRDN; + + write_vp(par, VP_MISC, misc); + /* Power on/off flat panel */ if (par->output & OUTPUT_PANEL) { |