xf86-video-intel: src/i830.h src/i830_uxa.c uxa/uxa.c uxa/uxa-priv.h

Keith Packard keithp at kemper.freedesktop.org
Sun Jun 6 16:01:51 PDT 2010


 src/i830.h     |    4 ++++
 src/i830_uxa.c |    8 ++++++++
 uxa/uxa-priv.h |    5 +++++
 uxa/uxa.c      |    8 ++++++++
 4 files changed, 25 insertions(+)

New commits:
commit 42ddc39430a10513c49a415ddf1a0dc5fa52089e
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Apr 30 13:33:54 2010 -0700

    Adapt to DevPrivate API changes
    
    This allows the driver to be built against either the old or new
    DevPrivate API.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/src/i830.h b/src/i830.h
index 8c96841..ea4f2c4 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -154,7 +154,11 @@ struct intel_pixmap {
 	struct list flush, batch, in_flight;
 };
 
+#if HAS_DEVPRIVATEKEYREC
+extern DevPrivateKeyRec uxa_pixmap_index;
+#else
 extern int uxa_pixmap_index;
+#endif
 
 static inline struct intel_pixmap *i830_get_pixmap_intel(PixmapPtr pixmap)
 {
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index e76f2cf..bf364f8 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -79,7 +79,11 @@ const int I830PatternROP[16] = {
 	ROP_1
 };
 
+#if HAS_DEVPRIVATEKEYREC
+DevPrivateKeyRec uxa_pixmap_index;
+#else
 int uxa_pixmap_index;
+#endif
 
 static void
 ironlake_blt_workaround(ScrnInfoPtr scrn)
@@ -1076,7 +1080,11 @@ Bool i830_uxa_init(ScreenPtr screen)
 	ScrnInfoPtr scrn = xf86Screens[screen->myNum];
 	intel_screen_private *intel = intel_get_screen_private(scrn);
 
+#if HAS_DIXREGISTERPRIVATEKEY
+	if (!dixRegisterPrivateKey(&uxa_pixmap_index, PRIVATE_PIXMAP, 0))
+#else
 	if (!dixRequestPrivate(&uxa_pixmap_index, 0))
+#endif
 		return FALSE;
 
 	intel->uxa_driver = uxa_driver_alloc();
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
index 9d99a73..47b62d4 100644
--- a/uxa/uxa-priv.h
+++ b/uxa/uxa-priv.h
@@ -166,7 +166,12 @@ typedef struct {
     (PixmapWidthPaddingInfo[d].padRoundUp+1)))
 #endif
 
+#if HAS_DEVPRIVATEKEYREC
+extern DevPrivateKeyRec uxa_screen_index;
+#else
 extern int uxa_screen_index;
+#endif
+
 static inline uxa_screen_t *uxa_get_screen(ScreenPtr screen)
 {
 	return (uxa_screen_t *) dixLookupPrivate(&screen->devPrivates,
diff --git a/uxa/uxa.c b/uxa/uxa.c
index 32b007d..cef480f 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -39,7 +39,11 @@
 #include "dixfontstr.h"
 #include "uxa.h"
 
+#if HAS_DEVPRIVATEKEYREC
+DevPrivateKeyRec uxa_screen_index;
+#else
 int uxa_screen_index;
+#endif
 
 /**
  * uxa_get_drawable_pixmap() returns a backing pixmap for a given drawable.
@@ -467,6 +471,10 @@ Bool uxa_driver_init(ScreenPtr screen, uxa_driver_t * uxa_driver)
 			   "non-NULL\n", screen->myNum);
 		return FALSE;
 	}
+#if HAS_DIXREGISTERPRIVATEKEY
+	if (!dixRegisterPrivateKey(&uxa_screen_index, PRIVATE_SCREEN, 0))
+	    return FALSE;
+#endif
 	uxa_screen = calloc(sizeof(uxa_screen_t), 1);
 
 	if (!uxa_screen) {


More information about the xorg-commit mailing list