diff options
Diffstat (limited to 'drivers/video/neofb.c')
-rw-r--r-- | drivers/video/neofb.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c index 747602aa5615..b961d5601bd9 100644 --- a/drivers/video/neofb.c +++ b/drivers/video/neofb.c | |||
@@ -486,10 +486,8 @@ static void vgaHWRestore(const struct fb_info *info, | |||
486 | static inline int neo2200_sync(struct fb_info *info) | 486 | static inline int neo2200_sync(struct fb_info *info) |
487 | { | 487 | { |
488 | struct neofb_par *par = info->par; | 488 | struct neofb_par *par = info->par; |
489 | int waitcycles; | ||
490 | 489 | ||
491 | while (readl(&par->neo2200->bltStat) & 1) | 490 | while (readl(&par->neo2200->bltStat) & 1); |
492 | waitcycles++; | ||
493 | return 0; | 491 | return 0; |
494 | } | 492 | } |
495 | 493 | ||
@@ -843,6 +841,9 @@ static int neofb_set_par(struct fb_info *info) | |||
843 | 841 | ||
844 | par->SysIfaceCntl2 = 0xc0; /* VESA Bios sets this to 0x80! */ | 842 | par->SysIfaceCntl2 = 0xc0; /* VESA Bios sets this to 0x80! */ |
845 | 843 | ||
844 | /* Initialize: by default, we want display config register to be read */ | ||
845 | par->PanelDispCntlRegRead = 1; | ||
846 | |||
846 | /* Enable any user specified display devices. */ | 847 | /* Enable any user specified display devices. */ |
847 | par->PanelDispCntlReg1 = 0x00; | 848 | par->PanelDispCntlReg1 = 0x00; |
848 | if (par->internal_display) | 849 | if (par->internal_display) |
@@ -1334,6 +1335,18 @@ static int neofb_blank(int blank_mode, struct fb_info *info) | |||
1334 | struct neofb_par *par = info->par; | 1335 | struct neofb_par *par = info->par; |
1335 | int seqflags, lcdflags, dpmsflags, reg; | 1336 | int seqflags, lcdflags, dpmsflags, reg; |
1336 | 1337 | ||
1338 | |||
1339 | /* | ||
1340 | * Reload the value stored in the register, if sensible. It might have | ||
1341 | * been changed via FN keystroke. | ||
1342 | */ | ||
1343 | if (par->PanelDispCntlRegRead) { | ||
1344 | neoUnlock(); | ||
1345 | par->PanelDispCntlReg1 = vga_rgfx(NULL, 0x20) & 0x03; | ||
1346 | neoLock(&par->state); | ||
1347 | } | ||
1348 | par->PanelDispCntlRegRead = !blank_mode; | ||
1349 | |||
1337 | switch (blank_mode) { | 1350 | switch (blank_mode) { |
1338 | case FB_BLANK_POWERDOWN: /* powerdown - both sync lines down */ | 1351 | case FB_BLANK_POWERDOWN: /* powerdown - both sync lines down */ |
1339 | seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */ | 1352 | seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */ |
@@ -1366,7 +1379,7 @@ static int neofb_blank(int blank_mode, struct fb_info *info) | |||
1366 | case FB_BLANK_NORMAL: /* just blank screen (backlight stays on) */ | 1379 | case FB_BLANK_NORMAL: /* just blank screen (backlight stays on) */ |
1367 | seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */ | 1380 | seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */ |
1368 | lcdflags = par->PanelDispCntlReg1 & 0x02; /* LCD normal */ | 1381 | lcdflags = par->PanelDispCntlReg1 & 0x02; /* LCD normal */ |
1369 | dpmsflags = 0; /* no hsync/vsync suppression */ | 1382 | dpmsflags = 0x00; /* no hsync/vsync suppression */ |
1370 | break; | 1383 | break; |
1371 | case FB_BLANK_UNBLANK: /* unblank */ | 1384 | case FB_BLANK_UNBLANK: /* unblank */ |
1372 | seqflags = 0; /* Enable sequencer */ | 1385 | seqflags = 0; /* Enable sequencer */ |