[PATCH] neofb: take existing display configuration as default
From: Christian Trefzer <hidden>
Date: 2005-12-22 18:51:05
Hello everyone, on a Dell Latitude CPi-A I noticed a strangeness wrt. the handling of an external monitor by the neomagic framebuffer driver, namely when the laptop is docked in a C/Dock II with the lid shut. A cold boot would result in the BIOS configuring the video chip to use the "external monitor only" mode, yet neofb would default to "internal LCD only". An attempt for a quick fix by using the Fn-F8 keystroke to toggle the display combination modes resulted in a reproductible hard lock, powering down being the only solution. The attached patch makes neofb probe the register for the current display mode, using that value as a default if nothing was specified as kernel/module parameter. Any comment welcome. If I should have wrongly Cc:ed someone, please let me know. Some questions related to neofb: I was desperately looking for any kind of specification regarding the NeoMagic NM2200 and similar chips - trying to understand what neofb.c does in general was possible, but understandind the hardware was not. With further information regarding registers and their intended use, I might play a little with the chip and driver. Any pointers to stuff on the web (google hit almost nil) or attachments would be great. TIA! Further issues I would like to investigate are, also with the CPi-A docked in the C/Dock II: - Even though "neofb:external" is given on the kernel command line, the external display is not activated. This is not in any way changed by the attached patch. The register values for display mode selection seem correct, though - I verified that by adding printk statements all over the place. It seems that the only missing thing is the final activation of the external display output: toggling the internal/external display three times via the keystroke gives the usual modulo 3 result, changing from (inactive) external-only to internal-only, then dual, then (active) external only. Any hints on where to look in particular? - Once the latter is fixed, I might look into pushing the resolution and depth to its limits. Recent X.org drivers put the NM2200 with 2560KB to 1280x1024 at 16bpp, vesafb gave me only 8bpp but the resolution was alright. Would it be possible to get a framebuffer of 1280x1024x16 out of this thing? One more thing that might be trivial for someone who ate the NeoMagic specs for breakfast: - Shutting the lid turns off the LCD backlight, but if power saving is configured via setterm, it is flipped back on once the given timeout is reached. In my case, with an open lid the backlight is off after five minutes. With the lid shut, it will be back on after five minutes ; ) Some state-machine-like info about certain registers, anyone? Thanks for your time. -- Chris
Attachments
- (unnamed) [application/pgp-signature] 827 bytes