* [PATCH]: Fix radeon blanking return value.
@ 2007-03-01 0:20 David Miller
2007-03-01 1:56 ` Antonino A. Daplas
0 siblings, 1 reply; 2+ messages in thread
From: David Miller @ 2007-03-01 0:20 UTC (permalink / raw)
To: adaplas; +Cc: linux-kernel
If you'll recall, over a year ago, I pointed out that the current
Radeon driver erroneously returns -EINVAL for valid blanking codes,
here is a link to that thread:
http://lkml.org/lkml/2006/1/28/6
No other driver does this, and it confuses the X server into thinking
that the device does not support blanking properly.
As a result I have to switch to a console VC and back to the X server
to unblank the screen, which is rediculious.
I've had to do this for more than 3 years and I'm really tired of this
problem still being around :-)
I looked again and there is simply no reason for the Radeon driver to
return -EINVAL for FB_BLANK_NORMAL. It claims it wants to do this in
order to convince fbcon to blank in software, right here:
if (fb_blank(info, blank))
fbcon_generic_blank(vc, info, blank);
to software blank the screen. But it only causes that to happen
in the FB_BLANK_NORMAL case.
That makes no sense because the Radeon code does this:
val |= CRTC_DISPLAY_DIS;
in the FB_BLANK_NORMAL case so should be blanking the hardware, and
there is therefore no reason to SW blank by returning -EINVAL.
Therefore I propose we finally apply the following patch. No other
fbdev driver does this madness, and as I've shown above there is no
justification for the behavior at all :-)
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index c32b714..af7eb07 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -1032,8 +1032,7 @@ int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch)
break;
}
- /* let fbcon do a soft blank for us */
- return (blank == FB_BLANK_NORMAL) ? -EINVAL : 0;
+ return 0;
}
static int radeonfb_blank (int blank, struct fb_info *info)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH]: Fix radeon blanking return value.
2007-03-01 0:20 [PATCH]: Fix radeon blanking return value David Miller
@ 2007-03-01 1:56 ` Antonino A. Daplas
0 siblings, 0 replies; 2+ messages in thread
From: Antonino A. Daplas @ 2007-03-01 1:56 UTC (permalink / raw)
To: David Miller; +Cc: linux-kernel
On Wed, 2007-02-28 at 16:20 -0800, David Miller wrote:
> If you'll recall, over a year ago, I pointed out that the current
> Radeon driver erroneously returns -EINVAL for valid blanking codes,
> here is a link to that thread:
>
> http://lkml.org/lkml/2006/1/28/6
>
> No other driver does this, and it confuses the X server into thinking
> that the device does not support blanking properly.
>
> As a result I have to switch to a console VC and back to the X server
> to unblank the screen, which is rediculious.
>
> I've had to do this for more than 3 years and I'm really tired of this
> problem still being around :-)
>
> I looked again and there is simply no reason for the Radeon driver to
> return -EINVAL for FB_BLANK_NORMAL. It claims it wants to do this in
> order to convince fbcon to blank in software, right here:
>
> if (fb_blank(info, blank))
> fbcon_generic_blank(vc, info, blank);
>
> to software blank the screen. But it only causes that to happen
> in the FB_BLANK_NORMAL case.
>
> That makes no sense because the Radeon code does this:
>
> val |= CRTC_DISPLAY_DIS;
>
> in the FB_BLANK_NORMAL case so should be blanking the hardware, and
> there is therefore no reason to SW blank by returning -EINVAL.
>
> Therefore I propose we finally apply the following patch. No other
> fbdev driver does this madness, and as I've shown above there is no
> justification for the behavior at all :-)
This was before radeonfb did not fully differentiate each blanking
levels. Currently, it is fixed, so I agree with this patch.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Antonino Daplas <adaplas@gmail.com>
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-01 1:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-01 0:20 [PATCH]: Fix radeon blanking return value David Miller
2007-03-01 1:56 ` Antonino A. Daplas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox