xf86-video-intel: 2 commits - src/i830_exa.c uxa/uxa.c uxa/uxa-priv.h

Eamon Walsh ewalsh at kemper.freedesktop.org
Thu Aug 28 13:17:48 PDT 2008


 src/i830_exa.c |   13 ++++---------
 uxa/uxa-priv.h |    4 ++--
 uxa/uxa.c      |    4 ++--
 3 files changed, 8 insertions(+), 13 deletions(-)

New commits:
commit 808b72f81454061c815321e51a9b9f925c4bf786
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Aug 26 22:24:36 2008 -0400

    Change uxa private keys to integer variables.
    
    Prepares for a devPrivates system that will store an index.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index fdce65f..fd29df1 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -726,12 +726,12 @@ I830EXAInit(ScreenPtr pScreen)
     return TRUE;
 }
 
-static DevPrivateKey	uxa_pixmap_key = &uxa_pixmap_key;
+static int uxa_pixmap_index;
 
 static void
 i830_uxa_set_pixmap_bo (PixmapPtr pixmap, dri_bo *bo)
 {
-    dixSetPrivate(&pixmap->devPrivates, uxa_pixmap_key, bo);
+    dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, bo);
 }
 
 dri_bo *
@@ -742,7 +742,7 @@ i830_get_pixmap_bo(PixmapPtr pixmap)
     I830Ptr i830 = I830PTR(scrn);
 
     if (i830->accel == ACCEL_UXA) {
-	return dixLookupPrivate(&pixmap->devPrivates, uxa_pixmap_key);
+	return dixLookupPrivate(&pixmap->devPrivates, &uxa_pixmap_index);
     } else if (i830->accel == ACCEL_EXA) {
 	struct i830_exa_pixmap_priv *driver_priv =
 	    exaGetPixmapDriverPrivate(pixmap);
@@ -874,7 +874,7 @@ i830_uxa_init (ScreenPtr pScreen)
     ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
     I830Ptr i830 = I830PTR(scrn);
 
-    if (!dixRequestPrivate(uxa_pixmap_key, 0))
+    if (!dixRequestPrivate(&uxa_pixmap_index, 0))
 	return FALSE;
     
     i830->uxa_driver = uxa_driver_alloc();
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
index c50ab3a..1353587 100644
--- a/uxa/uxa-priv.h
+++ b/uxa/uxa-priv.h
@@ -155,8 +155,8 @@ typedef struct {
     (PixmapWidthPaddingInfo[d].padRoundUp+1)))
 #endif
 
-extern DevPrivateKey uxa_screen_key;
-#define uxa_get_screen(s) ((uxa_screen_t *)dixLookupPrivate(&(s)->devPrivates, uxa_screen_key))
+extern int uxa_screen_index;
+#define uxa_get_screen(s) ((uxa_screen_t *)dixLookupPrivate(&(s)->devPrivates, &uxa_screen_index))
 
 /** Align an offset to an arbitrary alignment */
 #define UXA_ALIGN(offset, align) (((offset) + (align) - 1) - \
diff --git a/uxa/uxa.c b/uxa/uxa.c
index aac3d68..8658406 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -39,7 +39,7 @@
 #include "dixfontstr.h"
 #include "uxa.h"
 
-DevPrivateKey uxa_screen_key = &uxa_screen_key;
+int uxa_screen_index;
 
 /**
  * uxa_get_drawable_pixmap() returns a backing pixmap for a given drawable.
@@ -422,7 +422,7 @@ uxa_driver_init(ScreenPtr screen, uxa_driver_t *uxa_driver)
 
     uxa_screen->info = uxa_driver;
 
-    dixSetPrivate(&screen->devPrivates, uxa_screen_key, uxa_screen);
+    dixSetPrivate(&screen->devPrivates, &uxa_screen_index, uxa_screen);
 
 //    exaDDXDriverInit(screen);
 
commit 62ce9e8f9c8cc2014645d58f4249c496aebc36e8
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Tue Aug 26 22:23:06 2008 -0400

    Remove unused exa_pixmap_key.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index e73bc36..fdce65f 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -465,8 +465,6 @@ i830_transform_is_affine (PictTransformPtr t)
     return t->matrix[2][0] == 0 && t->matrix[2][1] == 0;
 }
 
-static DevPrivateKey exa_pixmap_key = &exa_pixmap_key;
-
 #ifdef XF86DRM_MODE
 
 static void *
@@ -618,9 +616,6 @@ I830EXAInit(ScreenPtr pScreen)
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
     I830Ptr pI830 = I830PTR(pScrn);
 
-    if (!dixRequestPrivate(exa_pixmap_key, 0))
-	return FALSE;
-
     pI830->EXADriverPtr = exaDriverAlloc();
     if (pI830->EXADriverPtr == NULL) {
 	pI830->accel = ACCEL_NONE;


More information about the xorg-commit mailing list