linux/drivers/video
Christian Trefzer 9f672004ab [PATCH] neofb: avoid resetting display config on unblank (v2)
There were two mistakes in the register-read-on-(un)blank approach.

- First, without proper register (un)locking the value read back will always
  be zero, and this is what I missed entirely until just now.  Due to this,
  the logic could not be verified at all and I tried some bogus checks which
  are completely stupid.

- Second, the LCD status bit will always be set to zero when the backlight
  has been turned off.  Reading the value back during unblank will disable the
  LCD unconditionally, regardless of the state it is supposed to be in, since
  we set it to zero beforehand.

So this is what we do now:

- create a new variable in struct neofb_par, and use that to determine
  whether to read back registers (initialized to true)

- before actually blanking the screen, read back the register to sense any
  possible change made through Fn key combo

- use proper neoUnlock() / neoLock() to actually read something

- every call to neofb_blank() determines if we read back next time: blanking
  disables readback, unblanking (FB_BLANK_UNBLANK) enables it

This should give us a nice and clean state machine.  Has been thoroughly
tested on a Dell Latitude CPiA / NM220 Chip docked to a C/Dock2 with attached
CRT in all possible combinations of LCD/CRT on/off.  I changed the config via
Fn key, let the console blank, unblanked by keypress - works flawlessly.

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>
2006-02-15 15:32:21 -08:00
..
aty Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2006-01-15 10:05:10 -08:00
backlight [PATCH] remove bogus asm/bug.h includes. 2006-02-07 20:56:35 -05:00
console [PARISC] Use kzalloc and other janitor-style cleanups 2006-01-22 20:26:31 -05:00
geode [PATCH] gx1fb: (try to) play nicer with various BIOSes 2006-01-14 18:27:14 -08:00
i810 [PATCH] i810fb: Do not probe the third i2c bus by default 2006-02-01 08:53:27 -08:00
intelfb [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
kyro [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
logo
matrox [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
nvidia [PATCH] nvidiafb: Add support for Geforce4 MX 4000 2006-02-11 21:41:13 -08:00
riva
savage
sis [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
68328fb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
acornfb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
acornfb.h
amba-clcd.c [ARM] amba-clcd: Allow RGB555 and RGB565 with 16bpp 2006-01-26 14:12:06 +00:00
amifb.c [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
arcfb.c [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
asiliantfb.c
atafb.c [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
au1100fb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
au1100fb.h
bt431.h
bt455.h
bw2.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
c2p.c
c2p.h
cfbcopyarea.c
cfbfillrect.c
cfbimgblt.c
cg3.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
cg6.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
cg14.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
chipsfb.c
cirrusfb.c
clps711xfb.c
controlfb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
controlfb.h
cyber2000fb.c
cyber2000fb.h
cyberfb.c
cyberfb.h
cyblafb.c [PATCH] PCI: cyblafb: remove pci_module_init() return, really. 2006-01-31 18:00:13 -08:00
dnfb.c
edid.h
epson1355fb.c
fbcmap.c
fbcvt.c
fbmem.c [PATCH] fbdev: video_setup() warning fix 2006-02-11 21:41:13 -08:00
fbmon.c
fbsysfs.c
ffb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
fm2fb.c
g364fb.c
gbefb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
hgafb.c
hitfb.c
hpfb.c
igafb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
imsttfb.c [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
imxfb.c
imxfb.h
Kconfig [PATCH] drivers/video/Kconfig: remove unused BUS_I2C option 2006-02-11 21:41:13 -08:00
leo.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
macfb.c [PATCH] m68k: fix macfb init 2006-01-12 09:09:05 -08:00
macmodes.c
macmodes.h
Makefile
maxinefb.c
modedb.c
neofb.c [PATCH] neofb: avoid resetting display config on unblank (v2) 2006-02-15 15:32:21 -08:00
offb.c
p9100.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
platinumfb.c
platinumfb.h
pm2fb.c
pm3fb.c [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
pmag-aa-fb.c [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
pmag-ba-fb.c [PATCH] remove bogus asm/bug.h includes. 2006-02-07 20:56:35 -05:00
pmagb-b-fb.c [PATCH] remove bogus asm/bug.h includes. 2006-02-07 20:56:35 -05:00
pvr2fb.c
pxafb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
pxafb.h
q40fb.c
radeonfb.c [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
retz3fb.c
retz3fb.h
s1d13xxxfb.c
s3c2410fb.c
s3c2410fb.h
S3triofb.c
sa1100fb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
sa1100fb.h
sbuslib.c [SPARC]: Fix sbusfb build. 2006-01-17 15:53:11 -08:00
sbuslib.h [SPARC]: Fix sbusfb build. 2006-01-17 15:53:11 -08:00
sgivwfb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
skeletonfb.c
sstfb.c [PATCH] fbdev: Sanitize ->fb_ioctl prototype 2006-01-14 18:27:14 -08:00
sticore.h
stifb.c [PARISC] stifb: Remove obsolete MODULE_PARM() 2006-01-10 21:53:07 -05:00
sun3fb.c
tcx.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
tdfxfb.c
tgafb.c
tridentfb.c
tx3912fb.c
valkyriefb.c
valkyriefb.h
vesafb.c
vfb.c [PATCH] fbdev: Sanitize ->fb_mmap prototype 2006-01-14 18:27:15 -08:00
vga16fb.c
vgastate.c
virgefb.c
virgefb.h
w100fb.c
w100fb.h