From 22f02120eb4092e1c283f81c8040f178693ff0a4 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 26 Jun 2012 09:53:54 +0100 Subject: [PATCH] xf86: store scanout pixmap in the xf86 struct as well. This is so we can tell the scanout pixmap has changed between calls to the crtc set function. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie --- hw/xfree86/modes/xf86Crtc.h | 6 +++++- hw/xfree86/modes/xf86RandR12.c | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h index 38b9ea58a..802303f74 100644 --- a/hw/xfree86/modes/xf86Crtc.h +++ b/hw/xfree86/modes/xf86Crtc.h @@ -225,7 +225,7 @@ typedef struct _xf86CrtcFuncs { } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr; -#define XF86_CRTC_VERSION 4 +#define XF86_CRTC_VERSION 5 struct _xf86Crtc { /** @@ -376,6 +376,10 @@ struct _xf86Crtc { * Added in ABI version 4 */ Bool driverIsPerformingTransform; + + /* Added in ABI version 5 + */ + PixmapPtr current_scanout; }; typedef struct _xf86OutputFuncs { diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index 5fc33caba..9548333c6 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -1157,6 +1157,9 @@ xf86RandR12CrtcSet(ScreenPtr pScreen, if (rotation != crtc->rotation) changed = TRUE; + if (crtc->current_scanout != randr_crtc->scanout_pixmap) + changed = TRUE; + transform = RRCrtcGetTransform(randr_crtc); if ((transform != NULL) != crtc->transformPresent) changed = TRUE; @@ -1218,6 +1221,7 @@ xf86RandR12CrtcSet(ScreenPtr pScreen, */ crtc->desiredMode = mode; crtc->desiredRotation = rotation; + crtc->current_scanout = randr_crtc->scanout_pixmap; if (transform) { crtc->desiredTransform = *transform; crtc->desiredTransformPresent = TRUE;