summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@koto.keithp.com>2007-08-19 20:29:37 -0700
committerDaniel Stone <daniel@fooishbar.org>2007-11-06 14:53:03 +0000
commitc5501865703d5d4ee49e081b6075ab89a583deb6 (patch)
tree20d6df56ec069ced258e018cbcca8bcf824d09b9
parent9244b8e4a2274946b56d9cf6d43487e11c29f7d7 (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. (cherry picked from commit 265a633cf1fcbf497d6916d9e22403dffdde2e07)
-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 e46d8a01c..38435c924 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)