Commit bb7e257e authored by Antonino A. Daplas's avatar Antonino A. Daplas Committed by Linus Torvalds

[PATCH] vesafb: Fix display corruption on display blank

Reported by: Bob Tracy <rct@gherkin.frus.com>

 "...I've got a Toshiba notebook (730XCDT -- Pentium 150MMX) for which
  I'm using the Vesa FB driver.  When the machine has been idle for some
  time and the driver attempts to powerdown the display, rather than the
  display going blank, it goes gray with several strange lines.  When I
  hit the "shift" key or other-wise wake up the display, the old video
  state is not fully restored..."

vesafb recently added a blank method which has only 2 states, powerup and
powerdown.  The powerdown state is used for all blanking levels, but in his
case, powerdown does not work correctly for higher levels of display
powersaving. Thus, for intermediate power levels, use software blanking,
and use only hardware blanking for an explicit powerdown.
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d846a92e
...@@ -96,14 +96,14 @@ static int vesafb_blank(int blank, struct fb_info *info) ...@@ -96,14 +96,14 @@ static int vesafb_blank(int blank, struct fb_info *info)
int loop = 10000; int loop = 10000;
u8 seq = 0, crtc17 = 0; u8 seq = 0, crtc17 = 0;
err = 0; if (blank == FB_BLANK_POWERDOWN) {
if (blank) {
seq = 0x20; seq = 0x20;
crtc17 = 0x00; crtc17 = 0x00;
err = 0;
} else { } else {
seq = 0x00; seq = 0x00;
crtc17 = 0x80; crtc17 = 0x80;
err = (blank == FB_BLANK_UNBLANK) ? 0 : -EINVAL;
} }
vga_wseq(NULL, 0x00, 0x01); vga_wseq(NULL, 0x00, 0x01);
......
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