diff options
author | Joshua Baergen <joshuabaergen@gentoo.org> | 2006-08-10 02:07:33 +0000 |
---|---|---|
committer | Joshua Baergen <joshuabaergen@gentoo.org> | 2006-08-10 02:07:33 +0000 |
commit | 02944983353c10f79c54591c6f87d06722ca4077 (patch) | |
tree | a5faac03354613e72bacb79df6bc72c2b8aa8e77 /x11-drivers | |
parent | Stop recommending ILISP. (diff) | |
download | gentoo-2-02944983353c10f79c54591c6f87d06722ca4077.tar.gz gentoo-2-02944983353c10f79c54591c6f87d06722ca4077.tar.bz2 gentoo-2-02944983353c10f79c54591c6f87d06722ca4077.zip |
Fix DRI with xorg-server >= 1.1. (Bug #136112, markus)
(Portage version: 2.1.1_pre4-r4)
Diffstat (limited to 'x11-drivers')
4 files changed, 160 insertions, 1 deletions
diff --git a/x11-drivers/xf86-video-mga/ChangeLog b/x11-drivers/xf86-video-mga/ChangeLog index 752bd1dd66b6..51ef8fefaf05 100644 --- a/x11-drivers/xf86-video-mga/ChangeLog +++ b/x11-drivers/xf86-video-mga/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-drivers/xf86-video-mga # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-mga/ChangeLog,v 1.27 2006/07/10 22:21:51 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-mga/ChangeLog,v 1.28 2006/08/10 02:07:33 joshuabaergen Exp $ + +*xf86-video-mga-1.4.1-r1 (10 Aug 2006) + + 10 Aug 2006; Joshua Baergen <joshuabaergen@gentoo.org> + +files/1.4.1-fix_drilock.patch, +xf86-video-mga-1.4.1-r1.ebuild: + Fix DRI with xorg-server >= 1.1. (Bug #136112, markus) 10 Jul 2006; Aron Griffis <agriffis@gentoo.org> xf86-video-mga-1.4.1.ebuild: diff --git a/x11-drivers/xf86-video-mga/files/1.4.1-fix_drilock.patch b/x11-drivers/xf86-video-mga/files/1.4.1-fix_drilock.patch new file mode 100644 index 000000000000..b09deafb725b --- /dev/null +++ b/x11-drivers/xf86-video-mga/files/1.4.1-fix_drilock.patch @@ -0,0 +1,115 @@ +--- src/mga_dri.c ++++ src/mga_dri.c +@@ -363,7 +363,6 @@ void MGAGetQuiescence( ScrnInfoPtr pScrn + { + MGAPtr pMga = MGAPTR(pScrn); + +- DRILock( screenInfo.screens[pScrn->scrnIndex], 0 ); + pMga->haveQuiescense = 1; + + if ( pMga->directRenderingEnabled ) { +@@ -401,8 +400,6 @@ void MGAGetQuiescenceShared( ScrnInfoPtr + MGAEntPtr pMGAEnt = pMga->entityPrivate; + MGAPtr pMGA2 = MGAPTR(pMGAEnt->pScrn_2); + +- DRILock( screenInfo.screens[pMGAEnt->pScrn_1->scrnIndex], 0 ); +- + pMga = MGAPTR(pMGAEnt->pScrn_1); + pMga->haveQuiescense = 1; + pMGA2->haveQuiescense = 1; +@@ -442,7 +439,11 @@ static void MGASwapContextShared( Screen + pMGA2->AccelInfoRec->NeedToSync = TRUE; + } + +-/* This is really only called from validate/postvalidate as we ++/* FIXME: This comment is out of date, since we aren't overriding ++ * Block/Wakeuphandler anymore. ++ * ++ * ++ * This is really only called from validate/postvalidate as we + * override the dri lock/unlock. Want to remove validate/postvalidate + * processing, but need to remove all client-side use of drawable lock + * first (otherwise there is noone recover when a client dies holding +@@ -464,14 +465,12 @@ MGADRISwapContext( ScreenPtr pScreen, DR + DRIContextType oldContextType, void *oldContext, + DRIContextType newContextType, void *newContext ) + { +-#if 0 + if ( syncType == DRI_3D_SYNC && + oldContextType == DRI_2D_CONTEXT && + newContextType == DRI_2D_CONTEXT ) + { + MGASwapContext( pScreen ); + } +-#endif + } + + static void +@@ -479,58 +478,12 @@ MGADRISwapContextShared( ScreenPtr pScre + DRIContextType oldContextType, void *oldContext, + DRIContextType newContextType, void *newContext ) + { +-#if 0 + if ( syncType == DRI_3D_SYNC && + oldContextType == DRI_2D_CONTEXT && + newContextType == DRI_2D_CONTEXT ) + { + MGASwapContextShared( pScreen ); + } +-#endif +-} +- +- +-static void MGAWakeupHandler( int screenNum, pointer wakeupData, +- unsigned long result, pointer pReadmask ) +-{ +- ScreenPtr pScreen = screenInfo.screens[screenNum]; +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; +- MGAPtr pMga = MGAPTR(pScrn); +- +- if ( xf86IsEntityShared( pScrn->entityList[0] ) +- && pMga->DualHeadEnabled) { +- MGASwapContextShared( pScreen ); +- } else { +- MGASwapContext( pScreen ); +- } +-} +- +-static void MGABlockHandler( int screenNum, pointer blockData, +- pointer pTimeout, pointer pReadmask ) +- +-{ +- ScreenPtr pScreen = screenInfo.screens[screenNum]; +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; +- MGAPtr pMga = MGAPTR(pScrn); +- MGAEntPtr pMGAEnt; +- +- if ( pMga->haveQuiescense ) { +- if ( xf86IsEntityShared( pScrn->entityList[0] ) ) { +- /* Restore to first screen */ +- pMga->RestoreAccelState( pScrn ); +- xf86SetLastScrnFlag( pScrn->entityList[0], pScrn->scrnIndex ); +- pMGAEnt = pMga->entityPrivate; +- +- if ( pMGAEnt->directRenderingEnabled ) { +- DRIUnlock( screenInfo.screens[pMGAEnt->pScrn_1->scrnIndex] ); +- } +- } else { +- if ( pMga->directRenderingEnabled ) { +- DRIUnlock( pScreen ); +- } +- } +- pMga->haveQuiescense = 0; +- } + } + + void MGASelectBuffer( ScrnInfoPtr pScrn, int which ) +@@ -1030,8 +983,6 @@ Bool MGADRIScreenInit( ScreenPtr pScreen + pDRIInfo->frameBufferStride = pScrn->displayWidth*(pScrn->bitsPerPixel/8); + pDRIInfo->ddxDrawableTableEntry = MGA_MAX_DRAWABLES; + +- pDRIInfo->wrap.BlockHandler = MGABlockHandler; +- pDRIInfo->wrap.WakeupHandler = MGAWakeupHandler; + pDRIInfo->wrap.ValidateTree = NULL; + pDRIInfo->wrap.PostValidateTree = NULL; + diff --git a/x11-drivers/xf86-video-mga/files/digest-xf86-video-mga-1.4.1-r1 b/x11-drivers/xf86-video-mga/files/digest-xf86-video-mga-1.4.1-r1 new file mode 100644 index 000000000000..48e246acc35d --- /dev/null +++ b/x11-drivers/xf86-video-mga/files/digest-xf86-video-mga-1.4.1-r1 @@ -0,0 +1,6 @@ +MD5 1b8cfd2923836ee93eda69abe50dda04 x11-driver-patches-1.tar.bz2 389 +RMD160 0c57d4b235d83f3d7c46691c13857fd121ddec2d x11-driver-patches-1.tar.bz2 389 +SHA256 64787d5b57d2845c0fa9297a9d924093ba191fc3551798239d9983f0bcca9b3e x11-driver-patches-1.tar.bz2 389 +MD5 ba373233a7d13084d14046a17b02e248 xf86-video-mga-1.4.1.tar.bz2 367973 +RMD160 d283690c1c5daf27fecbed973628b7a51300d4ce xf86-video-mga-1.4.1.tar.bz2 367973 +SHA256 5becb5f0caf0f99296db28b32be46eb95d0a88ac8e4829c47cb637fb52d06564 xf86-video-mga-1.4.1.tar.bz2 367973 diff --git a/x11-drivers/xf86-video-mga/xf86-video-mga-1.4.1-r1.ebuild b/x11-drivers/xf86-video-mga/xf86-video-mga-1.4.1-r1.ebuild new file mode 100644 index 000000000000..7c6ab59c0488 --- /dev/null +++ b/x11-drivers/xf86-video-mga/xf86-video-mga-1.4.1-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-mga/xf86-video-mga-1.4.1-r1.ebuild,v 1.1 2006/08/10 02:07:33 joshuabaergen Exp $ + +# Must be before x-modular eclass is inherited +#SNAPSHOT="yes" + +inherit x-modular + +DESCRIPTION="X.Org driver for mga cards" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="dri" +RDEPEND=">=x11-base/xorg-server-1.0.99" +DEPEND="${RDEPEND} + x11-proto/fontsproto + x11-proto/randrproto + x11-proto/renderproto + x11-proto/videoproto + x11-proto/xextproto + x11-proto/xproto + dri? ( x11-proto/xf86driproto + >=x11-libs/libdrm-2 )" + +CONFIGURE_OPTIONS="$(use_enable dri)" + +PATCHES="${FILESDIR}/${PV}-fix_drilock.patch" + +pkg_setup() { + if use dri && ! built_with_use x11-base/xorg-server dri; then + die "Build x11-base/xorg-server with USE=dri." + fi +} |