diff options
author | Rémi Cardona <remi@gentoo.org> | 2009-10-02 14:10:01 +0000 |
---|---|---|
committer | Rémi Cardona <remi@gentoo.org> | 2009-10-02 14:10:01 +0000 |
commit | 1fb55e699df01f80392a304ed242a34fc5ee42db (patch) | |
tree | 869a11bc542d76ef145f3c0bc6b482460c5d7a18 /x11-base | |
parent | This version has some buggy keystrokes (diff) | |
download | gentoo-2-1fb55e699df01f80392a304ed242a34fc5ee42db.tar.gz gentoo-2-1fb55e699df01f80392a304ed242a34fc5ee42db.tar.bz2 gentoo-2-1fb55e699df01f80392a304ed242a34fc5ee42db.zip |
x11-base/xorg-server: add patch to fix crasher bug #286746
(Portage version: 2.2_rc42/cvs/Linux i686)
Diffstat (limited to 'x11-base')
-rw-r--r-- | x11-base/xorg-server/ChangeLog | 6 | ||||
-rw-r--r-- | x11-base/xorg-server/files/1.6.4-re-fix-DGA-removal.patch | 150 | ||||
-rw-r--r-- | x11-base/xorg-server/xorg-server-1.6.4.ebuild | 3 |
3 files changed, 157 insertions, 2 deletions
diff --git a/x11-base/xorg-server/ChangeLog b/x11-base/xorg-server/ChangeLog index e6f27b1aa248..f300e8934d20 100644 --- a/x11-base/xorg-server/ChangeLog +++ b/x11-base/xorg-server/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for x11-base/xorg-server # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/ChangeLog,v 1.448 2009/09/30 20:17:56 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/ChangeLog,v 1.449 2009/10/02 14:10:00 remi Exp $ + + 02 Oct 2009; Rémi Cardona <remi@gentoo.org> + +files/1.6.4-re-fix-DGA-removal.patch, xorg-server-1.6.4.ebuild: + add patch to fix crasher bug #286746 30 Sep 2009; Samuli Suominen <ssuominen@gentoo.org> xorg-server-1.6.3.901-r2.ebuild: diff --git a/x11-base/xorg-server/files/1.6.4-re-fix-DGA-removal.patch b/x11-base/xorg-server/files/1.6.4-re-fix-DGA-removal.patch new file mode 100644 index 000000000000..877be51f40ee --- /dev/null +++ b/x11-base/xorg-server/files/1.6.4-re-fix-DGA-removal.patch @@ -0,0 +1,150 @@ +From fc31f76b6ff735e4a4006c5454c4d496ee8b154a Mon Sep 17 00:00:00 2001 +From: Keith Packard <keithp@keithp.com> +Date: Wed, 30 Sep 2009 18:40:19 +0000 +Subject: Re-fix DGA removal. + +Removing DGA ended up breaking any drivers calling into the old +xf86DiDGAInit function as it tried to see if DGA was already enabled +and ended up crashing if the VT wasn't completely initialized. Oops. + +Also, if the driver initializes DGA itself, have the DiDGA +initialization overwrite that information as the DiDGA code will call +ReInit on mode detect. + +Signed-off-by: Keith Packard <keithp@keithp.com> +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> +(cherry picked from commit db98b26ee145f70e732e2cf4a6ac3de77fdf4adc) +--- +diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c +index a06f285..3f7deba 100644 +--- a/hw/xfree86/common/xf86DGA.c ++++ b/hw/xfree86/common/xf86DGA.c +@@ -120,8 +120,22 @@ DGAInit( + + DGAScreenKey = &DGAScreenKeyIndex; + +- if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec)))) +- return FALSE; ++ pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); ++ ++ if (!pScreenPriv) ++ { ++ if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec)))) ++ return FALSE; ++ dixSetPrivate(&pScreen->devPrivates, DGAScreenKey, pScreenPriv); ++ pScreenPriv->CloseScreen = pScreen->CloseScreen; ++ pScreen->CloseScreen = DGACloseScreen; ++ pScreenPriv->DestroyColormap = pScreen->DestroyColormap; ++ pScreen->DestroyColormap = DGADestroyColormap; ++ pScreenPriv->InstallColormap = pScreen->InstallColormap; ++ pScreen->InstallColormap = DGAInstallColormap; ++ pScreenPriv->UninstallColormap = pScreen->UninstallColormap; ++ pScreen->UninstallColormap = DGAUninstallColormap; ++ } + + pScreenPriv->pScrn = pScrn; + pScreenPriv->numModes = num; +@@ -146,17 +160,6 @@ DGAInit( + modes[i].flags &= ~DGA_PIXMAP_AVAILABLE; + #endif + +- dixSetPrivate(&pScreen->devPrivates, DGAScreenKey, pScreenPriv); +- pScreenPriv->CloseScreen = pScreen->CloseScreen; +- pScreen->CloseScreen = DGACloseScreen; +- pScreenPriv->DestroyColormap = pScreen->DestroyColormap; +- pScreen->DestroyColormap = DGADestroyColormap; +- pScreenPriv->InstallColormap = pScreen->InstallColormap; +- pScreen->InstallColormap = DGAInstallColormap; +- pScreenPriv->UninstallColormap = pScreen->UninstallColormap; +- pScreen->UninstallColormap = DGAUninstallColormap; +- +- + return TRUE; + } + +diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c +index 899cea5..2627029 100644 +--- a/hw/xfree86/modes/xf86Crtc.c ++++ b/hw/xfree86/modes/xf86Crtc.c +@@ -770,7 +770,7 @@ xf86CrtcScreenInit (ScreenPtr screen) + screen->CloseScreen = xf86CrtcCloseScreen; + + #ifdef XFreeXDGA +- xf86DiDGAInit(screen, 0); ++ _xf86_di_dga_init_internal(screen); + #endif + #ifdef RANDR_13_INTERFACE + return RANDR_INTERFACE_VERSION; +@@ -1887,7 +1887,7 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn) + scrn->currentMode = scrn->modes; + #ifdef XFreeXDGA + if (scrn->pScreen) +- xf86DiDGAReInit(scrn->pScreen); ++ _xf86_di_dga_reinit_internal(scrn->pScreen); + #endif + } + +diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h +index 0a596bc..4fe4150 100644 +--- a/hw/xfree86/modes/xf86Crtc.h ++++ b/hw/xfree86/modes/xf86Crtc.h +@@ -807,6 +807,10 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus); + Bool + xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address); + ++/* this is the real function, used only internally */ ++_X_INTERNAL Bool ++_xf86_di_dga_init_internal (ScreenPtr pScreen); ++ + /** + * Re-initialize dga for this screen (as when the set of modes changes) + */ +@@ -814,6 +818,10 @@ xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address); + Bool + xf86DiDGAReInit (ScreenPtr pScreen); + ++/* This is the real function, used only internally */ ++_X_INTERNAL Bool ++_xf86_di_dga_reinit_internal (ScreenPtr pScreen); ++ + /* + * Set the subpixel order reported for the screen using + * the information from the outputs +diff --git a/hw/xfree86/modes/xf86DiDGA.c b/hw/xfree86/modes/xf86DiDGA.c +index 3992c09..bc59535 100644 +--- a/hw/xfree86/modes/xf86DiDGA.c ++++ b/hw/xfree86/modes/xf86DiDGA.c +@@ -175,6 +175,12 @@ static DGAFunctionRec xf86_dga_funcs = { + _X_EXPORT Bool + xf86DiDGAReInit (ScreenPtr pScreen) + { ++ return TRUE; ++} ++ ++Bool ++_xf86_di_dga_reinit_internal (ScreenPtr pScreen) ++{ + ScrnInfoPtr scrn = xf86Screens[pScreen->myNum]; + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); + +@@ -190,12 +196,15 @@ xf86DiDGAReInit (ScreenPtr pScreen) + _X_EXPORT Bool + xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address) + { ++ return TRUE; ++} ++ ++Bool ++_xf86_di_dga_init_internal (ScreenPtr pScreen) ++{ + ScrnInfoPtr scrn = xf86Screens[pScreen->myNum]; + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); + +- if (DGAAvailable(pScreen->myNum)) +- return TRUE; +- + xf86_config->dga_flags = 0; + xf86_config->dga_address = 0; + xf86_config->dga_width = 0; +-- +cgit v0.8.2 diff --git a/x11-base/xorg-server/xorg-server-1.6.4.ebuild b/x11-base/xorg-server/xorg-server-1.6.4.ebuild index 1fd26e038ca9..44627fd223da 100644 --- a/x11-base/xorg-server/xorg-server-1.6.4.ebuild +++ b/x11-base/xorg-server/xorg-server-1.6.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/xorg-server-1.6.4.ebuild,v 1.1 2009/09/28 08:18:37 remi Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/xorg-server-1.6.4.ebuild,v 1.2 2009/10/02 14:10:00 remi Exp $ EAPI="2" @@ -104,6 +104,7 @@ EPATCH_SUFFIX="patch" # ) PATCHES=( + "${FILESDIR}/1.6.4-re-fix-DGA-removal.patch" "${UPSTREAMED_PATCHES[@]}" ) |