File xorg-server-1.9.diff of Package xorg-x11-driver-video-intel-legacy

Index: xf86-video-intel-2.9.1/src/i830_video.c
===================================================================
--- xf86-video-intel-2.9.1.orig/src/i830_video.c
+++ xf86-video-intel-2.9.1/src/i830_video.c
@@ -2207,7 +2207,7 @@ i830_clip_video_helper (ScrnInfoPtr pScr
 static void
 i830_fill_colorkey (ScreenPtr pScreen, uint32_t key, RegionPtr clipboxes)
 {
-   DrawablePtr root = &WindowTable[pScreen->myNum]->drawable;
+   DrawablePtr root = &(pScreen->root)->drawable;
    XID	       pval[2];
    BoxPtr      pbox = REGION_RECTS(clipboxes);
    int	       i, nbox = REGION_NUM_RECTS(clipboxes);
@@ -2219,7 +2219,7 @@ i830_fill_colorkey (ScreenPtr pScreen, u
    gc = GetScratchGC(root->depth, pScreen);
    pval[0] = key;
    pval[1] = IncludeInferiors;
-   (void) ChangeGC(gc, GCForeground|GCSubwindowMode, pval);
+   (void) ChangeGCXIDs(NullClient, gc, GCForeground|GCSubwindowMode, pval);
    ValidateGC(root, gc);
 
    rects = xalloc (nbox * sizeof(xRectangle));
Index: xf86-video-intel-2.9.1/src/i2c_vid.h
===================================================================
--- xf86-video-intel-2.9.1.orig/src/i2c_vid.h
+++ xf86-video-intel-2.9.1/src/i2c_vid.h
@@ -24,6 +24,10 @@
 #define I2C_VID_H
 #include <randrstr.h>
 
+#define Xfree free
+#define Xcalloc(n) calloc(1,(n))
+#define Xalloc malloc
+
 typedef struct _I830I2CVidOutputRec {
     /**
      * Initialize the device at startup time.
Index: xf86-video-intel-2.9.1/src/i810.h
===================================================================
--- xf86-video-intel-2.9.1.orig/src/i810.h
+++ xf86-video-intel-2.9.1/src/i810.h
@@ -64,6 +64,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #include "common.h"
 #include "i810_ring.h"
 
+#define Xfree free
+#define Xcalloc(n) calloc(1,(n))
+#define Xalloc malloc
+#define Xrealloc realloc
+
 #define I810_VERSION 4000
 #define I810_NAME "intel"
 #define I810_DRIVER_NAME "intel"
Index: xf86-video-intel-2.9.1/src/i830_uxa.c
===================================================================
--- xf86-video-intel-2.9.1.orig/src/i830_uxa.c
+++ xf86-video-intel-2.9.1/src/i830_uxa.c
@@ -33,6 +33,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
 
 #include "xf86.h"
 #include "xaarop.h"
+#include "privates.h"
 #include "i830.h"
 #include "i810_reg.h"
 #include "i915_drm.h"
@@ -79,7 +80,7 @@ const int I830PatternROP[16] =
     ROP_1
 };
 
-static int uxa_pixmap_index;
+static DevPrivateKeyRec uxa_pixmap_index;
 
 /**
  * Returns whether a given pixmap is tiled or not.
@@ -703,7 +704,7 @@ i830_uxa_init (ScreenPtr pScreen)
     ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
     I830Ptr i830 = I830PTR(scrn);
 
-    if (!dixRequestPrivate(&uxa_pixmap_index, 0))
+    if (!dixRegisterPrivateKey(&uxa_pixmap_index, PRIVATE_PIXMAP, 0))
 	return FALSE;
 
     i830->uxa_driver = uxa_driver_alloc();
Index: xf86-video-intel-2.9.1/uxa/uxa-priv.h
===================================================================
--- xf86-video-intel-2.9.1.orig/uxa/uxa-priv.h
+++ xf86-video-intel-2.9.1/uxa/uxa-priv.h
@@ -177,7 +177,7 @@ typedef struct {
     (PixmapWidthPaddingInfo[d].padRoundUp+1)))
 #endif
 
-extern int uxa_screen_index;
+extern DevPrivateKeyRec uxa_screen_index;
 static inline uxa_screen_t *
 uxa_get_screen(ScreenPtr screen)
 {
Index: xf86-video-intel-2.9.1/uxa/uxa.c
===================================================================
--- xf86-video-intel-2.9.1.orig/uxa/uxa.c
+++ xf86-video-intel-2.9.1/uxa/uxa.c
@@ -39,7 +39,7 @@
 #include "dixfontstr.h"
 #include "uxa.h"
 
-int uxa_screen_index;
+DevPrivateKeyRec uxa_screen_index;
 
 /**
  * uxa_get_drawable_pixmap() returns a backing pixmap for a given drawable.
@@ -470,6 +470,9 @@ uxa_driver_init(ScreenPtr screen, uxa_dr
 
     uxa_screen->info = uxa_driver;
 
+    if (!dixRegisterPrivateKey(&uxa_screen_index, PRIVATE_SCREEN, 0))
+	return FALSE;
+
     dixSetPrivate(&screen->devPrivates, &uxa_screen_index, uxa_screen);
 
 //    exaDDXDriverInit(screen);
Index: xf86-video-intel-2.9.1/uxa/uxa.h
===================================================================
--- xf86-video-intel-2.9.1.orig/uxa/uxa.h
+++ xf86-video-intel-2.9.1/uxa/uxa.h
@@ -39,6 +39,10 @@
 #include "picturestr.h"
 #include "fb.h"
 
+#define Xfree free
+#define Xcalloc(n) calloc(1,(n))
+#define Xalloc malloc
+
 #define UXA_VERSION_MAJOR   1
 #define UXA_VERSION_MINOR   0
 #define UXA_VERSION_RELEASE 0
openSUSE Build Service is sponsored by