From: Andrew Morton <akpm@osdl.org>
To: adaplas@pol.net
Cc: adaplas@hotpop.com, linux-fbdev-devel@lists.sourceforge.net,
benh@kernel.crashing.org
Subject: Re: [PATCH 1/8] fbcon: Do not touch hardware if vc_mode != KD_TEXT
Date: Wed, 3 Nov 2004 15:52:04 -0800 [thread overview]
Message-ID: <20041103155204.7eb2daa3.akpm@osdl.org> (raw)
In-Reply-To: <200411031030.11430.adaplas@hotpop.com>
"Antonino A. Daplas" <adaplas@hotpop.com> wrote:
>
> Sigh, this patch uncovered a can of worms. I tested different combinations,
> those with/without xxxfb_blank implementation, framebuffers in directcolor
> or truecolor, etc. I find that there is a problem unblanking if the hardware
> has no xxxfb_blank() implementation, and also that the generic fb_blank() in
> fbmem.c is problematic with drivers in directcolor or pseudocolor mode when
> called by an fb application such as X.
>
> Display blanking is implemented in three ways:
>
> 1. using the drivers blanking implementation - info->fbops->fb_blank()
> 2. clearing the screen with the console erase character - fbcon_blank()
> 3. setting the color map to all black - fb_blank()
>
> The third method is problematic for these reasons:
>
> - Setting the colormap to all black will not work in truecolor mode
> - In directcolor or pseudocolor, it will overwrite the fb application's
> color map, producing wrong colors.
>
> So, remove the generic implementation in fb_blank() and just return -EINVAL
> if there is no hardware implementation. This will be only used by apps doing
> an FBIO_BLANK ioctl, and is a more robust approach.
This patch conflicts with Ben's "fbdev: workaround for broken X servers"
patch, which is in Linus's tree now.
So fb_blank() will now look like this:
int
fb_blank(struct fb_info *info, int blank)
{
int err = -EINVAL;
/* Workaround for broken X servers */
if (blank > VESA_POWERDOWN)
blank = VESA_POWERDOWN;
if (info->fbops->fb_blank)
err = info->fbops->fb_blank(blank, info);
return err;
}
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
next prev parent reply other threads:[~2004-11-03 23:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-02 11:46 [PATCH 1/8] fbcon: Do not touch hardware if vc_mode != KD_TEXT Antonino A. Daplas
2004-11-02 22:27 ` Benjamin Herrenschmidt
2004-11-02 23:27 ` Antonino A. Daplas
2004-11-03 2:30 ` Antonino A. Daplas
2004-11-03 23:52 ` Andrew Morton [this message]
2004-11-04 0:16 ` Benjamin Herrenschmidt
2004-11-04 0:57 ` Antonino A. Daplas
2004-11-04 0:58 ` Antonino A. Daplas
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=20041103155204.7eb2daa3.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=adaplas@hotpop.com \
--cc=adaplas@pol.net \
--cc=benh@kernel.crashing.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.