[PATCH 33/36] xf86: store scanout pixmap in the xf86 struct as well.

Dave Airlie airlied at gmail.com
Thu Jul 5 08:21:34 PDT 2012


From: Dave Airlie <airlied at redhat.com>

This is so we can tell the scanout pixmap has changed between calls
to the crtc set function.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 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 38b9ea5..802303f 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 165e2b7..309f933 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;
-- 
1.7.10.2



More information about the xorg-devel mailing list