public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net,
	Andrew Morton <akpm@osdl.org>, Ingo Oeser <ioe-lkml@rameria.de>,
	linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	benh@kernel.crashing.org, linux-kernel@hansmi.ch
Subject: Re: [Linux-fbdev-devel] [PATCH] fbdev: Fix usage of blank value passed to fb_blank
Date: Mon, 30 Jan 2006 07:34:38 +0800	[thread overview]
Message-ID: <43DD510E.9090404@gmail.com> (raw)
In-Reply-To: <20060129144228.GA22425@sci.fi>

Ville Syrjälä wrote:
> On Sun, Jan 29, 2006 at 10:18:19AM +0800, Antonino A. Daplas wrote:
>> diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
>> index d2dede6..5bed0fb 100644
>> --- a/drivers/video/fbmem.c
>> +++ b/drivers/video/fbmem.c
>> @@ -843,6 +843,19 @@ fb_blank(struct fb_info *info, int blank
>>  {	
>>   	int ret = -EINVAL;
>>  
>> +	/*
>> +	 * The framebuffer core supports 5 blanking levels (FB_BLANK), whereas
>> +	 * VESA defined only 4.  The extra level, FB_BLANK_NORMAL, is a
>> +	 * console invention and is not related to power management.
>> +	 * Unfortunately, fb_blank callers, especially X, pass VESA constants
>> +	 * leading to undefined behavior.
> 
> Since when? X.Org uses numbers 0,2,3,4 which match the FB_BLANK 
> constants not the VESA constants.
> 

How about if we silently convert FB_BLANK_NORMAL requests to
FB_BLANK_VSYNC_SUSPEND, would that work?

Tony

PS: Soft blanking is very difficult, if not impossible, to
implement correctly kernel-side, so we can either fail (current
code), silently fail but return success, or convert to the next
blank level.

  parent reply	other threads:[~2006-01-29 23:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-27 23:13 [PATCH] framebuffer: Remove old radeon driver Michael Hanselmann
2006-01-28  4:09 ` Benjamin Herrenschmidt
2006-01-28  4:46   ` David S. Miller
2006-01-28  5:59     ` Antonino A. Daplas
2006-01-28 20:06       ` Ingo Oeser
2006-01-29  2:18         ` [PATCH] fbdev: Fix usage of blank value passed to fb_blank Antonino A. Daplas
2006-01-29  8:18           ` Andrew Morton
2006-01-29 10:40             ` Antonino A. Daplas
2006-01-29 14:42           ` [Linux-fbdev-devel] " Ville Syrjälä
2006-01-29 22:19             ` Antonino A. Daplas
2006-01-29 23:34             ` Antonino A. Daplas [this message]
2006-01-30 10:22               ` Geert Uytterhoeven

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=43DD510E.9090404@gmail.com \
    --to=adaplas@gmail.com \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=ioe-lkml@rameria.de \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@hansmi.ch \
    --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