diff options
author | Dave Airlie <airlied@redhat.com> | 2008-03-10 18:38:49 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-03-10 18:38:49 +1000 |
commit | 68e3f6c80c1db7c84e176ef298c700ce5bedd501 (patch) | |
tree | 669d09d252ed6743505dd487da8d24c14ac0fb52 | |
parent | 497a081b8fc5d22890b3555589dfc4d2f9c9b6f6 (diff) |
old privates v2
-rw-r--r-- | src/amd_gx_randr.c | 7 | ||||
-rw-r--r-- | src/amd_lx_randr.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/amd_gx_randr.c b/src/amd_gx_randr.c index 1034939..cdcd635 100644 --- a/src/amd_gx_randr.c +++ b/src/amd_gx_randr.c @@ -54,7 +54,8 @@ typedef struct _GXRandRInfo Rotation supported_rotations; /* driver supported */ } XF86RandRInfoRec, *XF86RandRInfoPtr; -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#define AMD_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) +#if AMD_OLDPRIV static DevPrivateKey GXRandRKey; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ @@ -310,7 +311,7 @@ GXRandRInit(ScreenPtr pScreen, int rotation) GXRandRGeneration = serverGeneration; } -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#if AMD_OLDPRIV GXRandRIndex = AllocateScreenPrivateIndex(); #else GXRandRKey = &GXRandRKey; @@ -339,7 +340,7 @@ GXRandRInit(ScreenPtr pScreen, int rotation) pRandr->supported_rotations = rotation; pRandr->maxX = pRandr->maxY = 0; -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#if AMD_OLDPRIV dixSetPrivate(&pScreen->devPrivates, GXRandRKey, pRandr); #else pScreen->devPrivates[GXRandRIndex].ptr = pRandr; diff --git a/src/amd_lx_randr.c b/src/amd_lx_randr.c index 19880bb..f411de0 100644 --- a/src/amd_lx_randr.c +++ b/src/amd_lx_randr.c @@ -54,7 +54,8 @@ typedef struct _LXRandRInfo Rotation supported_rotations; /* driver supported */ } XF86RandRInfoRec, *XF86RandRInfoPtr; -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#define AMD_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4) +#if AMD_OLDPRIV static DevPrivateKey LXRandRKey; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ @@ -310,7 +311,7 @@ LXRandRInit(ScreenPtr pScreen, int rotation) LXRandRGeneration = serverGeneration; } -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#if AMD_OLDPRIV LXRandRIndex = AllocateScreenPrivateIndex(); #else LXRandRKey = &LXRandRKey; @@ -339,7 +340,7 @@ LXRandRInit(ScreenPtr pScreen, int rotation) pRandr->supported_rotations = rotation; pRandr->maxX = pRandr->maxY = 0; -#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +#if AMD_OLDPRIV dixSetPrivate(&pScreen->devPrivates, LXRandRKey, pRandr); #else pScreen->devPrivates[LXRandRIndex].ptr = pRandr; |