* [PATCH] neofb: take existing display configuration as default
@ 2005-12-22 18:49 Christian Trefzer
0 siblings, 0 replies; only message in thread
From: Christian Trefzer @ 2005-12-22 18:49 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: Antonino Daplas, Denis Oliver Kropp
[-- Attachment #1.1: Type: text/plain, Size: 2795 bytes --]
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
[-- Attachment #1.2: neofb-use-register-value-as-default.patch --]
[-- Type: text/plain, Size: 532 bytes --]
--- a/drivers/video/neofb.c 2005-12-19 19:47:20.000000000 +0100
+++ b/drivers/video/neofb.c 2005-12-22 02:39:32.000000000 +0100
@@ -852,8 +852,8 @@
/* If the user did not specify any display devices, then... */
if (par->PanelDispCntlReg1 == 0x00) {
- /* Default to internal (i.e., LCD) only. */
- par->PanelDispCntlReg1 |= 0x02;
+ /* Default to the value stored in the register. */
+ par->PanelDispCntlReg1 = vga_rgfx(NULL, 0x20) & 0x03;
}
/* If we are using a fixed mode, then tell the chip we are. */
[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-12-22 18:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-22 18:49 [PATCH] neofb: take existing display configuration as default Christian Trefzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).