From 265a633cf1fcbf497d6916d9e22403dffdde2e07 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 19 Aug 2007 20:29:37 -0700 Subject: 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. --- hw/xfree86/modes/xf86RandR12.c | 4 ++-- 1 file 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) -- cgit v1.2.3