linux-hardened/drivers
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
..
acorn [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
acpi [PATCH] x86_64: data/functions wrongly marked as __init with cpu hotplug. 2006-02-04 16:43:14 -08:00
amba [ARM] Remove asm/irq.h includes from ARM drivers 2006-01-09 13:56:42 +00:00
atm [ATM]: Remove unneeded kmalloc() return value casts + tiny whitespace cleanup 2006-01-10 13:09:01 -08:00
base [PATCH] fix __user annotations in drivers/base/memory.c 2006-02-07 20:58:04 -05:00
block [PATCH] pktcdvd: Reduce stack usage 2006-02-14 16:09:33 -08:00
bluetooth [Bluetooth] Fix firmware loading problem of BT3C driver 2006-02-13 11:40:07 +01:00
cdrom [PATCH] remove bogus asm/bug.h includes. 2006-02-07 20:56:35 -05:00
char [PATCH] HPET: handle multiple ACPI EXTENDED_IRQ resources 2006-02-14 16:09:34 -08:00
connector [PATCH] Switch getnstimestamp() calls to ktime_get_ts() 2006-01-10 08:01:39 -08:00
cpufreq [CPUFREQ] Whitespace/CodingStyle cleanups 2006-02-02 17:03:42 -05:00
crypto [CRYPTO] Allow AES C/ASM implementations to coexist 2006-01-09 14:15:39 -08:00
dio [PATCH] Add dio_bus_type probe and remove methods 2006-01-13 11:26:07 -08:00
edac [PATCH] drivers/edac/i82875p_edac.c __user annotations 2006-02-07 20:58:09 -05:00
eisa
fc4 [SPARC]: introduce a SPARC Kconfig symbol 2005-12-22 23:09:54 -08:00
firmware [PATCH] dell_rbu: fix Bug 5854 2006-01-14 18:27:13 -08:00
hwmon [PATCH] it87: Fix oops on removal 2006-02-13 22:30:10 -08:00
i2c [PATCH] i2c: Drop outdated probe/remove code in i2c-isa 2006-02-13 22:30:10 -08:00
ide [PATCH] ide: cast arguments to pr_debug() properly 2006-02-07 16:12:31 -08:00
ieee1394 Actually remove amdtp.[ch], cmp.[ch]. 2006-01-16 19:21:57 -05:00
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2006-02-14 13:49:37 -08:00
input Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input 2006-01-31 21:18:17 -08:00
isdn [PATCH] Fix NULL pointer dereference in isdn_tty_at_cout 2006-02-14 16:09:34 -08:00
macintosh ppc: fix up trivial Kconfig config selection 2006-02-08 07:51:17 -08:00
mca
md [PATCH] md: Make sure rdev->size gets set for version-1 superblocks 2006-02-03 08:32:00 -08:00
media [PATCH] drivers/media/video __user annotations and fixes 2006-02-08 01:03:39 -05:00
message [PATCH] Fix i2o_scsi oops on abort 2006-02-05 11:06:51 -08:00
mfd [PATCH] Add MCP bus_type probe and remove methods 2006-01-13 11:26:08 -08:00
misc [SERIAL] Remove UPF_AUTOPROBE and UPF_BOOT_ONLYMCA 2006-01-21 20:06:14 +00:00
mmc [MMC] Remove extra character in AU1XXX MMC Kconfig entry 2006-02-08 22:23:05 +00:00
mtd [PATCH] arm: fix dependencies for MTD_XIP 2006-02-08 01:02:58 -05:00
net [APPLETALK]: warning fix 2006-02-13 15:53:41 -08:00
nubus
oprofile [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
parisc [PARISC] Convert sba_iommu.c to use seq_file 2006-02-08 22:56:22 -05:00
parport Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 2006-02-03 18:17:47 -08:00
pci [PATCH] PowerPC/PCI Hotplug build break 2006-02-01 16:35:29 -08:00
pcmcia [PATCH] Add pcmcia_bus_type probe and remove methods 2006-01-13 11:26:08 -08:00
pnp Merge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa 2006-02-01 22:08:23 -08:00
rapidio [PATCH] Add rio_bus_type probe and remove methods 2006-01-13 11:26:10 -08:00
s390 [PATCH] s390: fix sclp memory corruption in tty pages list 2006-02-11 21:41:12 -08:00
sbus [PATCH] remove unused tmp_buf_sem's 2006-01-14 10:41:42 -08:00
scsi Merge branch 'upstream-fixes' 2006-02-09 04:29:00 -05:00
serial [SERIAL] Remove incorrect code from ioc4 serial driver 2006-02-10 21:50:43 +00:00
sh [PATCH] Add superhyway_bus_type probe and remove methods 2006-01-13 11:26:09 -08:00
sn [PATCH] sn3 iomem annotations and fixes 2006-02-08 01:03:52 -05:00
spi [PATCH] SPI: spi_butterfly, restore lost deltas 2006-02-06 12:17:17 -08:00
tc [PATCH] remove bogus asm/bug.h includes. 2006-02-07 20:56:35 -05:00
telephony [PATCH] ixj: fix writing silence check 2006-02-03 08:32:08 -08:00
usb [PATCH] USB: unusual-devs bugfix 2006-02-13 21:33:40 -08:00
video [PATCH] neofb: avoid resetting display config on unblank (v2) 2006-02-15 15:32:21 -08:00
w1 spelling: s/usefull/useful/ 2006-01-10 00:08:17 +01:00
zorro [PATCH] Add zorro_bus_type probe and remove methods 2006-01-13 11:26:10 -08:00
Kconfig [PATCH] EDAC: core EDAC support code 2006-01-18 19:20:31 -08:00
Makefile [PATCH] drivers/sn/ must be entered for CONFIG_SGI_IOC3 2006-01-26 13:22:03 -08:00