Commit 745c8560 authored by Jim Hague's avatar Jim Hague Committed by Linus Torvalds

[PATCH] pm2fb: Blanking fixes

- Current blanking code forces +ve (h|v)sync. Correct, match 2.4
  behaviour, and introduce VESA constants for clarity.
Signed-off-by: default avatarJim Hague <jim.hague@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6f0ac56d
...@@ -973,24 +973,26 @@ static int pm2fb_blank(int blank_mode, struct fb_info *info) ...@@ -973,24 +973,26 @@ static int pm2fb_blank(int blank_mode, struct fb_info *info)
DPRINTK("blank_mode %d\n", blank_mode); DPRINTK("blank_mode %d\n", blank_mode);
/* Turn everything on, then disable as requested. */
video |= (PM2F_VIDEO_ENABLE | PM2F_HSYNC_MASK | PM2F_VSYNC_MASK);
switch (blank_mode) { switch (blank_mode) {
case 0: /* Screen: On; HSync: On, VSync: On */ case 0:
/* Screen: On */
video |= PM2F_VIDEO_ENABLE;
break; break;
case 1: /* Screen: Off; HSync: On, VSync: On */ case VESA_NO_BLANKING + 1:
/* Screen: Off */
video &= ~PM2F_VIDEO_ENABLE; video &= ~PM2F_VIDEO_ENABLE;
break; break;
case 2: /* Screen: Off; HSync: On, VSync: Off */ case VESA_VSYNC_SUSPEND + 1:
video &= ~(PM2F_VIDEO_ENABLE | PM2F_VSYNC_MASK | PM2F_BLANK_LOW ); /* VSync: Off */
video &= ~(PM2F_VSYNC_MASK | PM2F_BLANK_LOW );
break; break;
case 3: /* Screen: Off; HSync: Off, VSync: On */ case VESA_HSYNC_SUSPEND + 1:
video &= ~(PM2F_VIDEO_ENABLE | PM2F_HSYNC_MASK | PM2F_BLANK_LOW ); /* HSync: Off */
video &= ~(PM2F_HSYNC_MASK | PM2F_BLANK_LOW );
break; break;
case 4: /* Screen: Off; HSync: Off, VSync: Off */ case VESA_POWERDOWN + 1:
video &= ~(PM2F_VIDEO_ENABLE | PM2F_VSYNC_MASK | PM2F_HSYNC_MASK| /* HSync: Off, VSync: Off */
PM2F_BLANK_LOW); video &= ~(PM2F_VSYNC_MASK | PM2F_HSYNC_MASK| PM2F_BLANK_LOW);
break; break;
} }
set_video(par, video); set_video(par, video);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment