diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-10-11 09:30:16 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-10-11 09:30:16 +0000 |
commit | 71521b10508860c113637caba0aecd1baa42948b (patch) | |
tree | da6b4a1dfaca44dc589ace044dc80f7928e32723 /driver/xf86-video-geode/src/gx_randr.c | |
parent | 7b2e233a1aad79e446c429576b90e408aa183921 (diff) |
update to xf86-video-geode 2.11.6. Tested on a Alix 3C3.
Diffstat (limited to 'driver/xf86-video-geode/src/gx_randr.c')
-rw-r--r-- | driver/xf86-video-geode/src/gx_randr.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/driver/xf86-video-geode/src/gx_randr.c b/driver/xf86-video-geode/src/gx_randr.c index 2b5a97ca4..d00e01c60 100644 --- a/driver/xf86-video-geode/src/gx_randr.c +++ b/driver/xf86-video-geode/src/gx_randr.c @@ -36,6 +36,7 @@ #include "xf86Module.h" #include "mipointer.h" #include "windowstr.h" +#include "inputstr.h" #include <X11/extensions/randr.h> #include <randrstr.h> @@ -55,20 +56,17 @@ typedef struct _GXRandRInfo Rotation supported_rotations; /* driver supported */ } XF86RandRInfoRec, *XF86RandRInfoPtr; -#define AMD_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) - -#if AMD_OLDPRIV - static int GXRandRIndex; -#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[GXRandRIndex].ptr) -#else - -static DevPrivateKey GXRandRKey; - -#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ - dixLookupPrivate(&(p)->devPrivates, GXRandRKey)); +#define OLD_VIDEODRV_INTERFACE (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) +#if OLD_VIDEODRV_INTERFACE +#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[GXRandRIndex].ptr) +#define XF86RANDRSET(p, v) (p)->devPrivates[GXRandRIndex].ptr = v +#else +#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ + dixLookupPrivate(&(p)->devPrivates, &GXRandRIndex)) +#define XF86RANDRSET(p, v) dixSetPrivate(&(p)->devPrivates, &GXRandRIndex, v) #endif static int @@ -209,7 +207,7 @@ GXRandRSetMode(ScreenPtr pScreen, * Get the new Screen pixmap ptr as SwitchMode might have called * ModifyPixmapHeader and xf86EnableDisableFBAccess will put it back... * Unfortunately. - + */ pspix = (*pScreen->GetScreenPixmap) (pScreen); @@ -333,10 +331,8 @@ GXRandRInit(ScreenPtr pScreen, int rotation) if (GXRandRGeneration != serverGeneration) { GXRandRGeneration = serverGeneration; } -#if AMD_OLDPRIV +#if OLD_VIDEODRV_INTERFACE GXRandRIndex = AllocateScreenPrivateIndex(); -#else - GXRandRKey = &GXRandRKey; #endif pRandr = xcalloc(sizeof(XF86RandRInfoRec), 1); @@ -362,10 +358,7 @@ GXRandRInit(ScreenPtr pScreen, int rotation) pRandr->supported_rotations = rotation; pRandr->maxX = pRandr->maxY = 0; -#if AMD_OLDPRIV - pScreen->devPrivates[GXRandRIndex].ptr = pRandr; -#else - dixSetPrivate(&pScreen->devPrivates, GXRandRKey, pRandr); -#endif + XF86RANDRSET(pScreen, pRandr); + return TRUE; } |