summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@koto.keithp.com>2007-08-19 20:29:37 -0700
committerKeith Packard <keithp@koto.keithp.com>2007-08-20 23:24:22 -0700
commit265a633cf1fcbf497d6916d9e22403dffdde2e07 (patch)
treeda201d57ec086249ea2bc18d0e76ffd71351c5df
parent7dc8531548cc9573e28bb04363dcbb3af5864c9a (diff)
Screen size changing should leave FB alone when X is inactive.
xf86RandR12ScreenSetSize must protect calls to EnableDisableFBAccess with suitable vtSema checks to avoid invoking driver code while the X server is inactive.
-rw-r--r--hw/xfree86/modes/xf86RandR12.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 9d74e5377..ae0a2cebf 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -345,7 +345,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
randrp->virtualX = pScrn->virtualX;
randrp->virtualY = pScrn->virtualY;
}
- if (pRoot)
+ if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE);
/* Let the driver update virtualX and virtualY */
@@ -363,7 +363,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
xf86SetViewport (pScreen, 0, 0);
finish:
- if (pRoot)
+ if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
#if RANDR_12_INTERFACE
if (WindowTable[pScreen->myNum] && ret)