From fdabcec57ae0fdc9910060609bb0848552c1db4d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 27 Sep 2010 17:30:13 +0100 Subject: [PATCH] modes: Beware the driver switching root pixmaps Program received signal SIGSEGV, Segmentation fault. 0x080d4a2d in xf86RandR12ScreenSetSize (pScreen=0x8dca3a0, width=800, height=600, mmWidth=210, mmHeight=157) at ../../../../hw/xfree86/modes/xf86RandR12.c:731 731 ../../../../hw/xfree86/modes/xf86RandR12.c: No such file or directory. in ../../../../hw/xfree86/modes/xf86RandR12.c (gdb) bt full height=600, mmWidth=210, mmHeight=157) at ../../../../hw/xfree86/modes/xf86RandR12.c:731 randrp = 0x8dcae68 pScrn = 0x8dbeb28 config = pRoot = 0x8e08e30 pScrnPix = 0xb6d12008 ret = 1 c = mmWidth=210, mmHeight=157) at ../../randr/rrscreen.c:185 No locals. at ../../randr/rrscreen.c:307 pWin = 0x8e08e30 pScreen = 0x8dca3a0 i = rc = 0 ../../randr/randr.c:485 Signed-off-by: Chris Wilson Cc: Julien Cristau Tested-by: Julien Cristau Cc: Keith Packard Reviewed-by: Keith Packard Signed-off-by: Keith Packard --- hw/xfree86/modes/xf86RandR12.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index dd2bdaca0..8a593a7e5 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -677,7 +677,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen, ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); WindowPtr pRoot = pScreen->root; - PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen); + PixmapPtr pScrnPix; Bool ret = FALSE; int c; @@ -714,6 +714,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen, } } + pScrnPix = (*pScreen->GetScreenPixmap)(pScreen); pScreen->width = pScrnPix->drawable.width = width; pScreen->height = pScrnPix->drawable.height = height; randrp->mmWidth = pScreen->mmWidth = mmWidth;