From: ctrefzer@gmx.de
To: akpm@osdl.org
Cc: adaplas@pol.net, linux-kernel@vger.kernel.org,
linux-fbdev-devel@lists.sourceforge.net
Subject: [-mm PATCH] neofb: enable LCD properly on unblank
Date: Wed, 15 Feb 2006 06:53:47 +0100 [thread overview]
Message-ID: <20060215055347.GA10941@zeus.uziel.local> (raw)
In-Reply-To: <200602150417.k1F4HSKX011435@shell0.pdx.osdl.net>
[-- Attachment #1: Type: text/plain, Size: 2941 bytes --]
Hi Andrew,
On Tue, Feb 14, 2006 at 08:16:29PM -0800, akpm@osdl.org wrote:
> The patch titled
>
> neofb: avoid resetting display config on unblank
>
> has been removed from the -mm tree. Its filename is
>
> neofb-avoid-resetting-display-config-on-unblank.patch
>
> This patch was probably dropped from -mm because
> it has now been merged into a subsystem tree or
> into Linus's tree, or because it was folded into
> its parent patch in the -mm tree.
seems like I was running late with my patch to handle the LCD properly
after blanking the screen.
We definitely need the patch below to get the LCD's backlight to a sane
state after unblanking. Otherwise, it is disabled unconditionally,
because the LCD is turned of literally in the registers during blank.
Reading those again on unblank will simply not reactivate the LCD, yet
DPMS was handled properly, leading me to wrong conclusions.
This adds a new variable to struct neo_par for storing a boolean whether
to read the register values next time we (un)blank. For some reason it
was not sufficient to check against !blank_mode while reading registers
in the beginning of neofb_blank().
Reworked patch against neofb.c having
neofb-avoid-resetting-display-config-on-unblank.patch applied.
Signed-off-by: Christian Trefzer <ctrefzer@gmx.de>
--- a/include/video/neomagic.h 2006-01-03 04:21:10.000000000 +0100
+++ b/include/video/neomagic.h 2006-02-09 20:59:20.164839408 +0100
@@ -159,6 +159,7 @@
unsigned char PanelDispCntlReg1;
unsigned char PanelDispCntlReg2;
unsigned char PanelDispCntlReg3;
+ unsigned char PanelDispCntlRegRead;
unsigned char PanelVertCenterReg1;
unsigned char PanelVertCenterReg2;
unsigned char PanelVertCenterReg3;
--- a/drivers/video/neofb.c 2006-02-08 21:24:05.000000000 +0100
+++ b/drivers/video/neofb.c 2006-02-11 11:39:39.346365480 +0100
@@ -843,6 +843,9 @@
par->SysIfaceCntl2 = 0xc0; /* VESA Bios sets this to 0x80! */
+ /* Initialize: by default, we want display config register to be read */
+ par->PanelDispCntlRegRead = 1;
+
/* Enable any user specified display devices. */
par->PanelDispCntlReg1 = 0x00;
if (par->internal_display)
@@ -1334,12 +1337,13 @@
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;
-
+ /* Reload the value stored in the register, if sensible. It might have been
+ * changed via FN keystroke. */
+ if (par->PanelDispCntlRegRead && !blank_mode) {
+ par->PanelDispCntlReg1 = vga_rgfx(NULL, 0x20) & 0x03;
+ }
+ par->PanelDispCntlRegRead = !blank_mode;
+
switch (blank_mode) {
case FB_BLANK_POWERDOWN: /* powerdown - both sync lines down */
seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */
[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]
parent reply other threads:[~2006-02-15 5:53 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <200602150417.k1F4HSKX011435@shell0.pdx.osdl.net>]
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=20060215055347.GA10941@zeus.uziel.local \
--to=ctrefzer@gmx.de \
--cc=adaplas@pol.net \
--cc=akpm@osdl.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--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;
as well as URLs for NNTP newsgroup(s).