xf86-video-mach64: Branch 'master' - 2 commits
Mark Kettenis
kettenis at kemper.freedesktop.org
Sun Sep 12 06:00:30 PDT 2010
src/aticonsole.c | 9 +--------
src/atimach64xv.c | 3 +++
src/atiscreen.c | 14 +++-----------
3 files changed, 7 insertions(+), 19 deletions(-)
New commits:
commit 1732886624c7590a8084bb7d92e87ff341aa6d66
Author: Mark Kettenis <kettenis at openbsd.org>
Date: Sun Aug 29 18:07:01 2010 +0200
Don't play wrapping games
The driver calls the wrapped CloseScreen function in the middle of messing
with the hardware state. On multi-card setups this may cause the VGA
arbiter to switch to a different card while we're in the middle of things,
with obvious disastrous effects. This fixes things by making sure we
only call the wrapped CloseScreen function at the very end of the driver's
CloseScreen function.
Signed-off-by: Mark Kettenis <kettenis at openbsd.org>
diff --git a/src/aticonsole.c b/src/aticonsole.c
index 8efe897..1be147e 100644
--- a/src/aticonsole.c
+++ b/src/aticonsole.c
@@ -784,17 +784,10 @@ ATIFreeScreen
int flags
)
{
- ScreenPtr pScreen = screenInfo.screens[iScreen];
ScrnInfoPtr pScreenInfo = xf86Screens[iScreen];
ATIPtr pATI = ATIPTR(pScreenInfo);
- if (pATI->Closeable || (serverGeneration > 1))
- ATII2CFreeScreen(iScreen);
-
- if (pATI->Closeable)
- (void)(*pScreen->CloseScreen)(iScreen, pScreen);
-
- ATILeaveGraphics(pScreenInfo, pATI);
+ ATII2CFreeScreen(iScreen);
#ifndef AVOID_CPIO
diff --git a/src/atiscreen.c b/src/atiscreen.c
index bc57934..cf79c37 100644
--- a/src/atiscreen.c
+++ b/src/atiscreen.c
@@ -628,7 +628,6 @@ ATICloseScreen
{
ScrnInfoPtr pScreenInfo = xf86Screens[iScreen];
ATIPtr pATI = ATIPTR(pScreenInfo);
- Bool Closed = TRUE;
#ifdef XF86DRI_DEVEL
@@ -658,21 +657,13 @@ ATICloseScreen
pATI->pXAAInfo = NULL;
}
#endif
-
- if ((pScreen->CloseScreen = pATI->CloseScreen))
- {
- pATI->CloseScreen = NULL;
- Closed = (*pScreen->CloseScreen)(iScreen, pScreen);
- }
-
- pATI->Closeable = FALSE;
-
if (pATI->pCursorInfo)
{
xf86DestroyCursorInfoRec(pATI->pCursorInfo);
pATI->pCursorInfo = NULL;
}
+ pATI->Closeable = FALSE;
ATILeaveGraphics(pScreenInfo, pATI);
#ifdef USE_XAA
@@ -688,5 +679,6 @@ ATICloseScreen
pATI->pShadow = NULL;
pScreenInfo->pScreen = NULL;
- return Closed;
+ pScreen->CloseScreen = pATI->CloseScreen;
+ return (*pScreen->CloseScreen)(iScreen, pScreen);
}
commit 7a1549678a19c6e94e1ecb3223c74effbd5009d2
Author: Mark Kettenis <kettenis at openbsd.org>
Date: Sun Aug 29 17:54:19 2010 +0200
Don't attempt to stop video on Mach64's without hardware overlay support
Older Mach64 variants don't have hardware overlay support. This is handled
properly when the XVideo adapter is initialized (we bail out early), but
ATICloseXVideo() unconditionally tries to stop video during screen termination.
This causes the server to hang on certain multi-card setups. Fix the issue
by checking Block1Base before proceeding with stopping video.
Signed-off-by: Mark Kettenis <kettenis at openbsd.org>
diff --git a/src/atimach64xv.c b/src/atimach64xv.c
index 21cd890..2c9b812 100644
--- a/src/atimach64xv.c
+++ b/src/atimach64xv.c
@@ -1552,6 +1552,9 @@ ATICloseXVideo
ATIPtr pATI
)
{
+ if (!pATI->Block1Base)
+ return;
+
ATIMach64StopVideo(pScreenInfo, pATI, TRUE);
REGION_UNINIT(pScreen, &pATI->VideoClip);
More information about the xorg-commit
mailing list