[PATCH] modes: Update pixmapPrivate after driver->resize() calls ModifyPixmapHeader
Chris Wilson
chris at chris-wilson.co.uk
Fri Sep 10 05:08:13 PDT 2010
As with xf86SwitchMode(), if the driver modifies the Screen pixmap header
in the course of resizing the framebuffer, this change needs to be
propagated to the ScrnInfo->pixmapPrivate or else the pixmap header will
be overwritten by xf86EnableDisableFBAccess().
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Julien Cristau <jcristau at debian.org>
Cc: Andrew Guertin <lists at dolphinling.net>
---
hw/xfree86/modes/xf86RandR12.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index c17b5fa..b334b3c 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -728,6 +728,13 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
}
pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
+ /*
+ * Get the new Screen pixmap ptr as resize() might have called
+ * ModifyPixmapHeader and xf86EnableDisableFBAccess will put it back...
+ * Unfortunately.
+ */
+ if (pScrnPix->devPrivate.ptr)
+ pScrn->pixmapPrivate = pScrnPix->devPrivate;
pScreen->width = pScrnPix->drawable.width = width;
pScreen->height = pScrnPix->drawable.height = height;
randrp->mmWidth = pScreen->mmWidth = mmWidth;
--
1.7.1
More information about the xorg-devel
mailing list