summaryrefslogtreecommitdiff
path: root/driver/xf86-video-geode/src/gx_randr.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-11-05 12:30:04 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-11-05 12:30:04 +0000
commit995c62c1b154d56a029323b773d1c6ff8902cebe (patch)
tree63aa9a4f1d6e11111132ec3230593ac18acd7f69 /driver/xf86-video-geode/src/gx_randr.c
parent2e96bbc16f528193e6aa8c5f8b7df1af41991470 (diff)
Update to xf86-video-geode 2.11.9.
A bunch of bug fixes and performance improvements. Tested on Alix 3c3.
Diffstat (limited to 'driver/xf86-video-geode/src/gx_randr.c')
-rw-r--r--driver/xf86-video-geode/src/gx_randr.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/driver/xf86-video-geode/src/gx_randr.c b/driver/xf86-video-geode/src/gx_randr.c
index d00e01c60..60d3cc6c9 100644
--- a/driver/xf86-video-geode/src/gx_randr.c
+++ b/driver/xf86-video-geode/src/gx_randr.c
@@ -28,7 +28,6 @@
#include "xf86.h"
#include "os.h"
-#include "mibank.h"
#include "globals.h"
#include "xf86.h"
#include "xf86Priv.h"
@@ -56,7 +55,11 @@ typedef struct _GXRandRInfo
Rotation supported_rotations; /* driver supported */
} XF86RandRInfoRec, *XF86RandRInfoPtr;
+#if HAS_DEVPRIVATEKEYREC
+static DevPrivateKeyRec GXRandRIndex;
+#else
static int GXRandRIndex;
+#endif
#define OLD_VIDEODRV_INTERFACE (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
@@ -161,7 +164,11 @@ GXRandRSetMode(ScreenPtr pScreen,
int oldHeight = pScreen->height;
int oldmmWidth = pScreen->mmWidth;
int oldmmHeight = pScreen->mmHeight;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 8
WindowPtr pRoot = WindowTable[pScreen->myNum];
+#else
+ WindowPtr pRoot = pScreen->root;
+#endif
DisplayModePtr currentMode = NULL;
Bool ret = TRUE;
PixmapPtr pspix = NULL;
@@ -334,6 +341,10 @@ GXRandRInit(ScreenPtr pScreen, int rotation)
#if OLD_VIDEODRV_INTERFACE
GXRandRIndex = AllocateScreenPrivateIndex();
#endif
+#if HAS_DIXREGISTERPRIVATEKEY
+ if (!dixRegisterPrivateKey(&GXRandRIndex, PRIVATE_SCREEN, 0))
+ return FALSE;
+#endif
pRandr = xcalloc(sizeof(XF86RandRInfoRec), 1);
if (pRandr == NULL)