diff options
author | Adam Jackson <ajax@nwnk.net> | 2005-12-14 19:41:28 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2005-12-14 19:41:28 +0000 |
commit | 726fd3a81dfbd1b0c8e4ede104a48523daecab92 (patch) | |
tree | 67eeed9780c6d9510f73f9a62de22c9395f070bd /src/r128_driver.c | |
parent | 328a2d74dabe32ce35e879799412666feedb0eef (diff) |
Bug #1760: Fix ati wrapper multihead to be dlloader friendly.
Diffstat (limited to 'src/r128_driver.c')
-rw-r--r-- | src/r128_driver.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/r128_driver.c b/src/r128_driver.c index a5c0e44..58b82a6 100644 --- a/src/r128_driver.c +++ b/src/r128_driver.c @@ -372,14 +372,29 @@ void R128LoaderRefSymLists(void) NULL); } +#ifdef XFree86LOADER +int getR128EntityIndex(void) +{ + int *r128_entity_index = LoaderSymbol("gR128EntityIndex"); + if (!r128_entity_index) + return -1; + else + return *r128_entity_index; +} +#else extern int gR128EntityIndex; +int getR128EntityIndex(void) +{ + return gR128EntityIndex; +} +#endif R128EntPtr R128EntPriv(ScrnInfoPtr pScrn) { DevUnion *pPriv; R128InfoPtr info = R128PTR(pScrn); pPriv = xf86GetEntityPrivate(info->pEnt->index, - gR128EntityIndex); + getR128EntityIndex()); return pPriv->ptr; } @@ -665,7 +680,7 @@ static Bool R128GetBIOSParameters(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10) DevUnion* pPriv; R128EntPtr pR128Ent; pPriv = xf86GetEntityPrivate(pScrn->entityList[0], - gR128EntityIndex); + getR128EntityIndex()); pR128Ent = pPriv->ptr; pR128Ent->HasSecondary = TRUE; @@ -689,7 +704,7 @@ static Bool R128GetBIOSParameters(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10) DevUnion* pPriv; R128EntPtr pR128Ent; pPriv = xf86GetEntityPrivate(pScrn->entityList[0], - gR128EntityIndex); + getR128EntityIndex()); pR128Ent = pPriv->ptr; pR128Ent->BypassSecondary = TRUE; } @@ -2054,7 +2069,7 @@ _X_EXPORT Bool R128PreInit(ScrnInfoPtr pScrn, int flags) R128EntPtr pR128Ent; info->IsSecondary = TRUE; pPriv = xf86GetEntityPrivate(pScrn->entityList[0], - gR128EntityIndex); + getR128EntityIndex()); pR128Ent = pPriv->ptr; if(pR128Ent->BypassSecondary) return FALSE; pR128Ent->pSecondaryScrn = pScrn; @@ -2066,7 +2081,7 @@ _X_EXPORT Bool R128PreInit(ScrnInfoPtr pScrn, int flags) info->IsPrimary = TRUE; xf86SetPrimInitDone(pScrn->entityList[0]); pPriv = xf86GetEntityPrivate(pScrn->entityList[0], - gR128EntityIndex); + getR128EntityIndex()); pR128Ent = pPriv->ptr; pR128Ent->pPrimaryScrn = pScrn; pR128Ent->IsDRIEnabled = FALSE; @@ -2410,7 +2425,7 @@ _X_EXPORT Bool R128ScreenInit(int scrnIndex, ScreenPtr pScreen, DevUnion* pPriv; R128EntPtr pR128Ent; pPriv = xf86GetEntityPrivate(pScrn->entityList[0], - gR128EntityIndex); + getR128EntityIndex()); pR128Ent = pPriv->ptr; pR128Ent->IsDRIEnabled = info->directRenderingEnabled; } @@ -3111,7 +3126,7 @@ static void R128RestoreMode(ScrnInfoPtr pScrn, R128SavePtr restore) } pPriv = xf86GetEntityPrivate(pScrn->entityList[0], - gR128EntityIndex); + getR128EntityIndex()); pR128Ent = pPriv->ptr; |