linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: James Simmons <jsimmons@infradead.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Linus Torvalds <torvalds@transmeta.com>,
	Linux Fbdev development list 
	<linux-fbdev-devel@lists.sourceforge.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [BK PATCHS] fbdev updates.
Date: Tue, 15 Oct 2002 10:00:24 +0100	[thread overview]
Message-ID: <20021015100024.A9771@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.33.0210140937040.4264-100000@maxwell.earthlink.net>; from jsimmons@infradead.org on Mon, Oct 14, 2002 at 09:39:31AM -0700

On Mon, Oct 14, 2002 at 09:39:31AM -0700, James Simmons wrote:
>  drivers/video/clps711xfb.c        |    2

Ok, this won't clash with the updates Linus pulled recently from me
that actually allow this driver to build again in 2.5.42.

> diff -Nru a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c
> --- a/drivers/video/clps711xfb.c	Mon Oct 14 09:36:34 2002
> +++ b/drivers/video/clps711xfb.c	Mon Oct 14 09:36:34 2002
> @@ -194,7 +194,6 @@
>  	.owner		= THIS_MODULE,
>  	.fb_check_var	= clps7111fb_check_var,
>  	.fb_set_par	= clps7111fb_set_par,
> -	.fb_set_var	= gen_set_var,
>  	.fb_setcolreg	= clps7111fb_setcolreg,
>  	.fb_blank	= clps7111fb_blank,
>  	.fb_fillrect	= cfb_fillrect,
> @@ -322,7 +321,6 @@
>  		clps_writeb(clps_readb(PDDR) | EDB_PD3_LCDBL, PDDR);
>  	}
> 
> -	gen_set_var(&cfb->var, -1, cfb);
>  	err = register_framebuffer(cfb);
> 
>  out:	return err;

I'm not sure this "set var" business has been thought out as much as it
should be.

If can_soft_blank is not set, the driver will never, ever receive any
calls to perform blanking via the fb_blank callback.  Even the power
management blanking calls are blocked, and fbcon clears the screen
instead.  This in itself is fine.

However, since the set_var method has gone, drivers are now unable to
set can_soft_blank according to their capabilities because
fbgen.c:gen_set_disp will do it for them thusly:

        if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR ||
            info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
                display->can_soft_blank = info->fbops->fb_blank ? 1 : 0;
                display->dispsw_data = NULL;
        } else {
                display->can_soft_blank = 0;
                display->dispsw_data = info->pseudo_palette;
        }

This sucks on devices where blanking can be performed by hardware means.
For example, on embedded devices, you can turn off the LCD controller
and LCD panel (and thereby save power).  There's no point in having both
these powered/running when the display is not in use, draining valuable
battery power.

This is also true of most, if not all VGA cards when VESA blanking is in
effect.  As the code currently stands, if the console is in pseudo colour
or direct colour mode, everything works as expected.  However, if it isn't,
you can't even power down your monitor when the screen blanks.

In 2.5.42, there is a work around possible - it is possible to intercept
the call to gen_set_var, and set con_soft_blank according to your driver
capabilities.  However, with the fb_set_var method going away, this is no
longer possible.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

  parent reply	other threads:[~2002-10-15  8:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-13 20:33 [BK PATCHS] fbdev updates James Simmons
2002-10-14 10:10 ` Geert Uytterhoeven
2002-10-14 16:39   ` James Simmons
2002-10-15  8:38     ` Geert Uytterhoeven
2002-10-18 16:48       ` James Simmons
2002-10-15  9:00     ` Russell King [this message]
2002-10-15  9:14       ` Geert Uytterhoeven
2002-10-15  9:38         ` Russell King
2002-10-18 17:27           ` James Simmons
2002-10-18 18:32             ` Russell King
2002-10-18 21:24               ` [Linux-fbdev-devel] " James Simmons
2002-10-18 21:37                 ` Russell King
2002-10-22 17:13                   ` Geert Uytterhoeven
2002-10-18 17:16         ` James Simmons
2002-10-18 17:05       ` James Simmons

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=20021015100024.A9771@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=geert@linux-m68k.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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).