Skip to content

Commit

Permalink
[PATCH] neofb: avoid resetting display config on unblank
Browse files Browse the repository at this point in the history
Fix issues with the NeoMagic framebuffer driver.

It nicely complements my previous fix already in linus' tree.  The only
thing missing now is that the external CRT will not be activated at neofb
init when external-only is selected, either by register read or
module/kernel parameter.

Testing was done on a Dell Latitude CPi-A/NM2200 chip.

Previous behaviour:
- before booting linux, set the preferred display config X via FN+F8

- boot linux, neofb stores the register values in a private
  variable

- change the display config to Y via keystroke

- leave the machine in peace until display is blanked

- touching any key will result in display config X being restored

- booting up, the BIOS will acknowledge config Y, though...

Current behaviour:
At the time of unblanking, config Y is honoured because we now read back
register contents instead of just overwriting them with outdated values.

Signed-off by: Christian Trefzer <ctrefzer@gmx.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Christian Trefzer authored and Linus Torvalds committed Feb 15, 2006
1 parent e2fbf1a commit 10ee39f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/video/neofb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,12 @@ static int neofb_blank(int blank_mode, struct fb_info *info)
struct neofb_par *par = info->par;
int seqflags, lcdflags, dpmsflags, reg;

/*
* Reload the value stored in the register, might have been changed via
* FN keystroke
*/
par->PanelDispCntlReg1 = vga_rgfx(NULL, 0x20) & 0x03;

switch (blank_mode) {
case FB_BLANK_POWERDOWN: /* powerdown - both sync lines down */
seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */
Expand Down Expand Up @@ -1366,7 +1372,7 @@ static int neofb_blank(int blank_mode, struct fb_info *info)
case FB_BLANK_NORMAL: /* just blank screen (backlight stays on) */
seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */
lcdflags = par->PanelDispCntlReg1 & 0x02; /* LCD normal */
dpmsflags = 0; /* no hsync/vsync suppression */
dpmsflags = 0x00; /* no hsync/vsync suppression */
break;
case FB_BLANK_UNBLANK: /* unblank */
seqflags = 0; /* Enable sequencer */
Expand Down

0 comments on commit 10ee39f

Please sign in to comment.