From: Christian Trefzer <ctrefzer@gmx.de>
To: "Antonino A. Daplas" <adaplas@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] neofb: avoid resetting display config on unblank
Date: Wed, 8 Feb 2006 21:22:07 +0100 [thread overview]
Message-ID: <20060208202207.GA26682@zeus.uziel.local> (raw)
[-- Attachment #1: Type: text/plain, Size: 2024 bytes --]
This patch fixes issues with the NeoMagic framebuffer driver.
It nicely complements my previous fix already in linus' tree. The only
thing missing now is that the external CRT will not be activated at
neofb init when external-only is selected, either by register read or
module/kernel parameter.
Testing was done on a Dell Latitude CPi-A/NM2200 chip.
Previous behaviour:
- before booting linux, set the preferred display config X via FN+F8
- boot linux, neofb stores the register values in a private
variable
- change the display config to Y via keystroke
- leave the machine in peace until display is blanked
- touching any key will result in display config X being restored
- booting up, the BIOS will acknowledge config Y, though...
Current behaviour:
At the time of unblanking, config Y is honoured because we now read back
register contents instead of just overwriting them with outdated values.
Signed-off by: Christian Trefzer <ctrefzer@gmx.de>
---
--- linux-2.6.15-ct3/drivers/video/neofb.c.orig 2006-02-08 19:59:39.187793848 +0100
+++ linux-2.6.15-ct3/drivers/video/neofb.c 2006-02-08 20:52:28.174719064 +0100
@@ -1334,6 +1334,9 @@
struct neofb_par *par = (struct neofb_par *)info->par;
int seqflags, lcdflags, dpmsflags, reg;
+ /* Reload the value stored in the register, might have been changed via FN keystroke */
+ par->PanelDispCntlReg1 = vga_rgfx(NULL, 0x20) & 0x03;
+
switch (blank_mode) {
case FB_BLANK_POWERDOWN: /* powerdown - both sync lines down */
seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */
@@ -1366,7 +1369,7 @@
case FB_BLANK_NORMAL: /* just blank screen (backlight stays on) */
seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */
lcdflags = par->PanelDispCntlReg1 & 0x02; /* LCD normal */
- dpmsflags = 0; /* no hsync/vsync suppression */
+ dpmsflags = 0x00; /* no hsync/vsync suppression */
break;
case FB_BLANK_UNBLANK: /* unblank */
seqflags = 0; /* Enable sequencer */
[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]
next reply other threads:[~2006-02-08 20:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-08 20:22 Christian Trefzer [this message]
2006-02-10 11:36 ` [PATCH] neofb: add more logic to determine sensibility of register readback Christian Trefzer
2006-02-10 11:53 ` Antonino A. Daplas
2006-02-10 13:57 ` Christian Trefzer
2006-02-10 16:41 ` Kyle Moffett
2006-02-11 10:42 ` Christian Trefzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060208202207.GA26682@zeus.uziel.local \
--to=ctrefzer@gmx.de \
--cc=adaplas@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®