- struct neofb_par *par = (struct neofb_par *)info->par;
- int seqflags, lcdflags, dpmsflags, reg;
+ struct neofb_par *par = info->par;
+ int seqflags, lcdflags, dpmsflags, reg, tmpdisp;
+
+ /*
+ * Read back the register bits related to display configuration. They might
+ * have been changed underneath the driver via Fn key stroke.
+ */
+ neoUnlock();
+ tmpdisp = vga_rgfx(NULL, 0x20) & 0x03;
+ neoLock(&par->state);
+
+ /* In case we blank the screen, we want to store the possibly new
+ * configuration in the driver. During un-blank, we re-apply this setting,
+ * since the LCD bit will be cleared in order to switch off the backlight.
+ */
+ if (par->PanelDispCntlRegRead) {
+ par->PanelDispCntlReg1 = tmpdisp;
+ }
+ par->PanelDispCntlRegRead = !blank_mode;