Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105562
b: refs/heads/master
c: 104b198
h: refs/heads/master
v: v3
  • Loading branch information
Jordan Crouse authored and Linus Torvalds committed Jul 24, 2008
1 parent b146ba8 commit 888a626
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be935d5b6301865b4e9ec35d79d398cedb3c82b7
refs/heads/master: 104b198dd0b3b62a4fc4e9146f01f2abc718e926
28 changes: 18 additions & 10 deletions trunk/drivers/video/geode/lxfb_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit 888a626

Please sign in to comment.