framebuffer: Remove old radeon driver
PATCH 1/1 framebuffer: Remove old radeon driver
This patch removes the old radeon driver which has been replaced by a newer one.
---
drivers/video/Kconfig +0 -14
@@ -893,20 +893,6 @@ config FB_MATROX_MULTIHEAD There is no need for enabling 'Matrox multihead support' if you have only one Matrox card in the box. -config FB_RADEON_OLD - tristate "ATI Radeon display support (Old driver)" - depends on FB && PCI - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - select FB_MACMODES if PPC - help - Choose this option if you want to use an ATI Radeon graphics card as - a framebuffer device. There are both PCI and AGP versions. You - don't need to choose this to run the Radeon in plain VGA mode. - There is a product page at - <http://www.ati.com/na/pages/products/pc/radeon32/index.html>. - config FB_RADEON tristate "ATI Radeon display support" depends on FB && PCI
drivers/video/Makefile +0 -1
@@ -39,7 +39,6 @@ obj-$(CONFIG_FB_KYRO) += kyr obj-$(CONFIG_FB_SAVAGE) += savage/ obj-$(CONFIG_FB_GEODE) += geode/ obj-$(CONFIG_FB_I810) += vgastate.o -obj-$(CONFIG_FB_RADEON_OLD) += radeonfb.o obj-$(CONFIG_FB_NEOMAGIC) += neofb.o vgastate.o obj-$(CONFIG_FB_VIRGE) += virgefb.o obj-$(CONFIG_FB_3DFX) += tdfxfb.o
drivers/video/radeonfb.c +0 -3167
2,973 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Quoted 4 lines · Michael Hanselmann
This patch removes the old radeon driver which has been replaced by a newer one.
Signed-off-by Michael Hanselmann <[email protected]>
From: Benjamin Herrenschmidt <[email protected]>
Date: Sat, 28 Jan 2006 15:09:52 +1100
Quoted 7 lines · Michael Hanselmann
Quoted 4 lines
This patch removes the old radeon driver which has been replaced by a newer one.
Signed-off-by Michael Hanselmann <[email protected]>
I have no problem with this, but I want to point out one artifact of the current Radeon driver which drivers me nuts :-)
The radeon_screen_blank() routine returns error codes back to the X server which handily confuses it, making it impossible to unblank the screen unless X has taken it all the way to power-off or somesuch. The comment above this problematic code states:
/* let fbcon do a soft blank for us */ return (blank == FB_BLANK_NORMAL) ? -EINVAL : 0;
There has to be a better way to do this, which doesn't break X when run via fbcon. :-)
Quoted 11 lines · David S. Miller
From: Benjamin Herrenschmidt <[email protected]>
Date: Sat, 28 Jan 2006 15:09:52 +1100Quoted 1 line · Michael Hanselmann
The
radeon_screen_blank()routine returns error codes back to the X server which handily confuses it, making it impossible to unblank the screen unless X has taken it all the way to power-off or somesuch. The comment above this problematic code states:
Quoted 6 lines
/* let fbcon do a soft blank for us */ return (blank == FB_BLANK_NORMAL) ? -EINVAL : 0;There has to be a better way to do this, which doesn't break X when run via fbcon. :-)
The console layer has 5 blanking levels, with FB_BLANK_NORMAL defined as "soft blank" (or blank the display without turning off display sync signals) -- a console invention. However, VESA has only 4 levels.
This can be easily fixed by incrementing the blank value by one if the request originated from userspace. I'll provide a patch soon.
Tony
Quoted 7 lines · Antonino A. Daplas
The console layer has 5 blanking levels, with
FB_BLANK_NORMALdefined as "soft blank" (or blank the display without turning off display sync signals) -- a console invention. However, VESA has only 4 levels.This can be easily fixed by incrementing the blank value by one if the request originated from userspace. I'll provide a patch soon.
May I suggest to hide this implementation detail?
E.g. please provide a macro/function blank_fb2vesa() just for this detail instead of doing magic increments in those drivers.
Many thanks!
Regards
Ingo Oeser
PATCH 1/1 fbdev: Fix usage of blank value passed to fb_blank
The fb_blank() hook accepts 5 blanking levels which include 1 level designed for console use only. Userspace is only aware of 4 levels. Thus, it's possible for userspace to request VESA_VSYNC_SUSPEND which, in turn, is interpreted by the fb driver as a request for FB_BLANK_NORMAL. A few drivers return -EINVAL for this, confusing userspace apps that the driver may not have VESA blanking support.
Fix by incrementing the blank value by one if the request originated from userspace.
---
Quoted 2 lines · Ingo Oeser
Quoted 2 lines
May I suggest to hide this implementation detail?
Yes. The change will be invisible to drivers.
Unfortunately, this may cause some userland breakage. X should work. However, some apps may have been developed that uses the FB_BLANK constants (DirectFB?). In these cases, they'll get a deeper blank level instead, so it probably won't affect them significantly. A follow up patch that hides the FB_BLANK constants may be worthwhile.
drivers/video/fbmem.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
drivers/video/fbmem.c +13 -0
@@ -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. +* +* To avoid confusion, fb_blank will assume VESA constants if coming +* from userspace, and FB_BLANK constants if coming from the kernel. +*/ +if (info->flags &FBINFO_MISC_USEREVENT && blank) + blank++; +if (blank >FB_BLANK_POWERDOWN ) blank =FB_BLANK_POWERDOWN ;
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
Re: [PATCH] fbdev: Fix usage of blank value passed to fb_blank
Quoted 6 lines · Antonino A. Daplas
Unfortunately, this may cause some userland breakage. X should work.
However, some apps may have been developed that uses theFB_BLANKconstants (DirectFB?). In these cases, they'll get a deeper blank level instead, so it probably won't affect them significantly. A follow up patch that hides theFB_BLANKconstants may be worthwhile.
Would prefer to avoid any userland breakage. Is this followup patch happening?
Re: [PATCH] fbdev: Fix usage of blank value passed to fb_blank
Quoted 9 lines · Andrew Morton
Quoted 5 lines · Antonino A. Daplas
Unfortunately, this may cause some userland breakage. X should work.
However, some apps may have been developed that uses theFB_BLANKconstants (DirectFB?). In these cases, they'll get a deeper blank level instead, so it probably won't affect them significantly. A follow up patch that hides theFB_BLANKconstants may be worthwhile.Would prefer to avoid any userland breakage. Is this followup patch happening?
I'm still doing research on which major fb apps depend on the FB_BLANK constants, but my guess is that the follow up patch is inevitable. We cannot avoid bending over backwards for X :(
Tony
Re: [Linux-fbdev-devel] [PATCH] fbdev: Fix usage of blank value passed to fb_blank
In reply to Antonino A. DaplasQuoted 5 lines · Antonino A. Daplas
drivers/video/fbmem.c +0
-0
drivers/video/fbmem.c fb_blank(struct fb_info *info, int blank · line 851
Quoted 9 lines
drivers/video/fbmem.c +6
-0@@ -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.
Signature · 3 lines
Ville Syrjälä [email protected] http://www.sci.fi/~syrjala/
Re: [Linux-fbdev-devel] [PATCH] fbdev: Fix usage of blank value passed to fb_blank
Quoted 9 lines · Ville Syrjälä
Quoted 8 lines · Antonino A. Daplas
drivers/video/fbmem.c +0
-0@@ -843,6 +843,19 @@ fb_blank(struct fb_info *info, int blank {int ret = -EINVAL ;
Quoted 10 lines
drivers/video/fbmem.c fb_blank(struct fb_info *info, int blank · line 851
Quoted 6 lines
drivers/video/fbmem.c +6
-0+/* +* 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_BLANKconstants not the VESA constants.
Hmm, you're correct... But I do remember that particular error before, about FBIOBLANK returning -EINVAL. I think it may be coming from this particular code
BoolfbdevHWSaveScreen(ScreenPtr pScreen, int mode)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
unsigned long unblank;
TRACE_ENTER("HWSaveScreen");
if (!pScrn->vtSema)
return TRUE;
unblank = xf86IsUnblank(mode);
if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *)(1-unblank))) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"FBIOBLANK: %s\n", strerror(errno));
return FALSE;
}
return TRUE;
}The FBIOBLANK ioctl call passes only 2 possible values, 0 and 1 (1-unblank).
Andrew,
I think you should drop this patch, Xorg/XFree86's fbdevhw DPMS support does the correct thing. It's only the above that may be producing the particular error as reported by David. I'm not sure how to fix that (kernel or X side).
Tony
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
Re: [Linux-fbdev-devel] [PATCH] fbdev: Fix usage of blank value passed to fb_blank
In reply to Ville SyrjäläQuoted 9 lines · Ville Syrjälä
Quoted 8 lines · Antonino A. Daplas
drivers/video/fbmem.c +0
-0@@ -843,6 +843,19 @@ fb_blank(struct fb_info *info, int blank {int ret = -EINVAL ;
Quoted 10 lines
drivers/video/fbmem.c fb_blank(struct fb_info *info, int blank · line 851
Quoted 6 lines
drivers/video/fbmem.c +6
-0+/* +* 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_BLANKconstants 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.
Re: [Linux-fbdev-devel] [PATCH] fbdev: Fix usage of blank value passed to fb_blank
Quoted 21 lines · Antonino A. Daplas
Quoted 9 lines · Ville Syrj�l�
Quoted 8 lines · Antonino A. Daplas
drivers/video/fbmem.c +0
-0@@ -843,6 +843,19 @@ fb_blank(struct fb_info *info, int blank {int ret = -EINVAL ;Quoted 10 lines
drivers/video/fbmem.c fb_blank(struct fb_info *info, int blank · line 851
Quoted 6 lines
drivers/video/fbmem.c +6
-0+/* +* 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_BLANKconstants not the VESA constants.
Quoted 2 lines
How about if we silently convert
FB_BLANK_NORMALrequests toFB_BLANK_VSYNC_SUSPEND, would that work?
Do all (old, pre-VESA) monitors like it when vsync goes away?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds