Commit 4836f574 authored by Christian Trefzer's avatar Christian Trefzer Committed by Linus Torvalds

[PATCH] neofb: take existing display configuration as default

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.
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 16ab3adf
...@@ -853,7 +853,7 @@ static int neofb_set_par(struct fb_info *info) ...@@ -853,7 +853,7 @@ static int neofb_set_par(struct fb_info *info)
/* If the user did not specify any display devices, then... */ /* If the user did not specify any display devices, then... */
if (par->PanelDispCntlReg1 == 0x00) { if (par->PanelDispCntlReg1 == 0x00) {
/* Default to internal (i.e., LCD) only. */ /* Default to internal (i.e., LCD) only. */
par->PanelDispCntlReg1 |= 0x02; par->PanelDispCntlReg1 = vga_rgfx(NULL, 0x20) & 0x03;
} }
/* If we are using a fixed mode, then tell the chip we are. */ /* If we are using a fixed mode, then tell the chip we are. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment