mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
drop superfluous getAMDGPUEntityIndex() and _X_EXPORT
a) instead of duplicated extern declarations of gAMDGPUEntityIndex in several source files, just move this into amdgpu_drv.h header. b) no need to _X_EXPORT this field (no other modul using it ever). c) no need for extra getter function, just use the field directly. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Joseph Crowell
parent
60020bc22e
commit
fb4912cd4a
@@ -351,4 +351,6 @@ extern RRCrtcPtr amdgpu_randr_crtc_covering_drawable(DrawablePtr pDraw);
|
||||
|
||||
extern AMDGPUEntPtr AMDGPUEntPriv(ScrnInfoPtr pScrn);
|
||||
|
||||
extern int gAMDGPUEntityIndex;
|
||||
|
||||
#endif /* _AMDGPU_DRV_H_ */
|
||||
|
||||
@@ -217,18 +217,11 @@ amdgpu_unwrap_property_requests(ScrnInfoPtr scrn)
|
||||
amdgpu_property_vectors_wrapped = FALSE;
|
||||
}
|
||||
|
||||
extern _X_EXPORT int gAMDGPUEntityIndex;
|
||||
|
||||
static int getAMDGPUEntityIndex(void)
|
||||
{
|
||||
return gAMDGPUEntityIndex;
|
||||
}
|
||||
|
||||
AMDGPUEntPtr AMDGPUEntPriv(ScrnInfoPtr pScrn)
|
||||
{
|
||||
DevUnion *pPriv;
|
||||
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
|
||||
pPriv = xf86GetEntityPrivate(info->pEnt->index, getAMDGPUEntityIndex());
|
||||
pPriv = xf86GetEntityPrivate(info->pEnt->index, gAMDGPUEntityIndex);
|
||||
return pPriv->ptr;
|
||||
}
|
||||
|
||||
@@ -269,7 +262,7 @@ static void AMDGPUFreeRec(ScrnInfoPtr pScrn)
|
||||
DevUnion *pPriv;
|
||||
AMDGPUEntPtr pAMDGPUEnt;
|
||||
pPriv = xf86GetEntityPrivate(pScrn->entityList[0],
|
||||
getAMDGPUEntityIndex());
|
||||
gAMDGPUEntityIndex);
|
||||
|
||||
pAMDGPUEnt = pPriv->ptr;
|
||||
pAMDGPUEnt->fd_ref--;
|
||||
@@ -1507,7 +1500,7 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags)
|
||||
return FALSE;
|
||||
|
||||
pAMDGPUEnt = xf86GetEntityPrivate(pScrn->entityList[0],
|
||||
getAMDGPUEntityIndex())->ptr;
|
||||
gAMDGPUEntityIndex)->ptr;
|
||||
|
||||
if (!AMDGPUGetRec(pScrn))
|
||||
return FALSE;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
#include <xf86platformBus.h>
|
||||
|
||||
_X_EXPORT int gAMDGPUEntityIndex = -1;
|
||||
int gAMDGPUEntityIndex = -1;
|
||||
|
||||
/* Return the options for supported chipset 'n'; NULL otherwise */
|
||||
static const OptionInfoRec *AMDGPUAvailableOptions(int chipid, int busid)
|
||||
|
||||
Reference in New Issue
Block a user