[PATCH] neofb: avoid resetting display config on unblank

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>

authored by Christian Trefzer and committed by Linus Torvalds 10ee39fe e2fbf1ac

+7 -1
+7 -1
drivers/video/neofb.c
··· 1334 1334 struct neofb_par *par = info->par; 1335 1335 int seqflags, lcdflags, dpmsflags, reg; 1336 1336 1337 + /* 1338 + * Reload the value stored in the register, might have been changed via 1339 + * FN keystroke 1340 + */ 1341 + par->PanelDispCntlReg1 = vga_rgfx(NULL, 0x20) & 0x03; 1342 + 1337 1343 switch (blank_mode) { 1338 1344 case FB_BLANK_POWERDOWN: /* powerdown - both sync lines down */ 1339 1345 seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */ ··· 1372 1366 case FB_BLANK_NORMAL: /* just blank screen (backlight stays on) */ 1373 1367 seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */ 1374 1368 lcdflags = par->PanelDispCntlReg1 & 0x02; /* LCD normal */ 1375 - dpmsflags = 0; /* no hsync/vsync suppression */ 1369 + dpmsflags = 0x00; /* no hsync/vsync suppression */ 1376 1370 break; 1377 1371 case FB_BLANK_UNBLANK: /* unblank */ 1378 1372 seqflags = 0; /* Enable sequencer */