123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 |
- Upstream: no (Too lazy)
- Reason: Fixes building the package by getting rid of old cpp macros
- that are no longer accepted
- diff --git a/src/g80_driver.c b/src/g80_driver.c
- index 719b96c..3b8e55b 100644
- --- a/src/g80_driver.c
- +++ b/src/g80_driver.c
- @@ -151,7 +151,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
- {
- G80Ptr pNv;
- EntityInfoPtr pEnt;
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- struct pci_device *pPci;
- int err;
- void *p;
- @@ -184,14 +184,14 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
- pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
- if(pEnt->location.type != BUS_PCI) goto fail;
- pPci = xf86GetPciInfoForEntity(pEnt->index);
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- /* Need this to unmap */
- pNv->pPci = pPci;
- #endif
- primary = xf86IsPrimaryPci(pPci);
-
- /* The ROM size sometimes isn't read correctly, so fix it up here. */
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- if(pPci->rom_size == 0)
- /* The BIOS is 64k */
- pPci->rom_size = 64 * 1024;
- @@ -304,7 +304,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
- pScrn->memPhysBase = MEMBASE(pPci, 1);
- pScrn->fbOffset = 0;
-
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- err = pci_device_map_range(pPci, pPci->regions[0].base_addr, G80_REG_SIZE,
- PCI_DEV_MAP_FLAG_WRITABLE, &p);
- if(err) {
- @@ -336,7 +336,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
-
- /* Determine the size of BAR1 */
- /* Some configs have BAR1 < total RAM < 256 MB */
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- BAR1sizeKB = pPci->regions[1].size / 1024;
- #else
- BAR1sizeKB = 1UL << (pPci->size[1] - 10);
- @@ -366,7 +366,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
- xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " Mapped memory: %.1f MB\n",
- pScrn->videoRam / 1024.0);
-
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- err = pci_device_map_range(pPci, pPci->regions[1].base_addr,
- pScrn->videoRam * 1024,
- PCI_DEV_MAP_FLAG_WRITABLE |
- @@ -521,7 +521,7 @@ G80CloseScreen(CLOSE_SCREEN_ARGS_DECL)
-
- if(xf86ServerIsExiting()) {
- if(pNv->int10) xf86FreeInt10(pNv->int10);
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- pci_device_unmap_range(pNv->pPci, pNv->mem, pNv->videoRam * 1024);
- pci_device_unmap_range(pNv->pPci, (void*)pNv->reg, G80_REG_SIZE);
- #else
- diff --git a/src/g80_type.h b/src/g80_type.h
- index f4b73a3..5b1f975 100644
- --- a/src/g80_type.h
- +++ b/src/g80_type.h
- @@ -41,7 +41,7 @@ typedef enum AccelMethod {
- } AccelMethod;
-
- typedef struct G80Rec {
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- struct pci_device *pPci;
- #endif
- volatile CARD32 * reg;
- diff --git a/src/nv_const.h b/src/nv_const.h
- index 8f9799c..b0cc14f 100644
- --- a/src/nv_const.h
- +++ b/src/nv_const.h
- @@ -6,7 +6,7 @@
- #define NV_DRIVER_NAME "nv"
-
- /* libpciaccess gratuitous API changes */
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- #define MEMBASE(p,n) (p)->regions[n].base_addr
- #define VENDOR_ID(p) (p)->vendor_id
- #define DEVICE_ID(p) (p)->device_id
- diff --git a/src/nv_dac.c b/src/nv_dac.c
- index 2269ae3..8d79ed8 100644
- --- a/src/nv_dac.c
- +++ b/src/nv_dac.c
- @@ -42,7 +42,7 @@ NVDACPanelTweaks(NVPtr pNv, NVRegPtr state)
- we can do is experiment and apply hacks. */
-
- if(((pNv->Chipset & 0xffff) == 0x0328) && (state->bpp == 32)) {
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- if (((pNv->PciInfo->subvendor_id & 0xffff) == 0x1179) &&
- ((pNv->PciInfo->subdevice_id & 0xffff) == 0x0020))
- #else
- diff --git a/src/nv_driver.c b/src/nv_driver.c
- index 3a74038..cf185f8 100644
- --- a/src/nv_driver.c
- +++ b/src/nv_driver.c
- @@ -43,7 +43,7 @@ Bool G80GetScrnInfoRec(PciChipsets *chips, int chip);
- /* Mandatory functions */
- static const OptionInfoRec * NVAvailableOptions(int chipid, int busid);
- static void NVIdentify(int flags);
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- static Bool NVPciProbe(DriverPtr, int entity, struct pci_device*, intptr_t data);
- #else
- static Bool NVProbe(DriverPtr drv, int flags);
- @@ -76,7 +76,7 @@ static void NVRestore(ScrnInfoPtr pScrn);
- static Bool NVModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
- static Bool NVSetModeVBE(ScrnInfoPtr pScrn, DisplayModePtr pMode);
-
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- /* For now, just match any NVIDIA display device and sort through them in the
- * probe routine */
-
- @@ -109,7 +109,7 @@ _X_EXPORT DriverRec NV = {
- NV_VERSION,
- NV_DRIVER_NAME,
- NVIdentify,
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- NULL,
- #else
- NVProbe,
- @@ -118,7 +118,7 @@ _X_EXPORT DriverRec NV = {
- NULL,
- 0,
- NULL,
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- NVPciIdMatchList,
- NVPciProbe,
- #endif
- @@ -712,7 +712,7 @@ nvSetup(pointer module, pointer opts, int *errmaj, int *errmin)
- if (!setupDone) {
- setupDone = TRUE;
- xf86AddDriver(&NV, module,
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- HaveDriverFuncs
- #else
- 0
- @@ -785,14 +785,14 @@ NVGetScrnInfoRec(PciChipsets *chips, int chip)
-
-
- static CARD32
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- NVGetPCIXpressChip (struct pci_device *dev)
- #else
- NVGetPCIXpressChip (pciVideoPtr pVideo)
- #endif
- {
- volatile CARD32 *regs;
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- uint32_t pciid, pcicmd;
- void *tmp;
-
- @@ -902,7 +902,7 @@ NVIsSupported(CARD32 id)
- }
-
- /* Mandatory */
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- static Bool
- NVPciProbe(DriverPtr drv, int entity, struct pci_device *dev, intptr_t data)
- {
- @@ -2097,7 +2097,7 @@ NVMapMem(ScrnInfoPtr pScrn)
- {
- NVPtr pNv = NVPTR(pScrn);
-
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- void *tmp;
-
- pci_device_map_range(pNv->PciInfo, pNv->FbAddress, pNv->FbMapSize,
- @@ -2144,7 +2144,7 @@ NVUnmapMem(ScrnInfoPtr pScrn)
-
- pNv = NVPTR(pScrn);
-
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- pci_device_unmap_range(pNv->PciInfo, pNv->FbBase, pNv->FbMapSize);
- #else
- xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pNv->FbBase, pNv->FbMapSize);
- diff --git a/src/nv_hw.c b/src/nv_hw.c
- index 9291912..90c7ac7 100644
- --- a/src/nv_hw.c
- +++ b/src/nv_hw.c
- @@ -653,7 +653,7 @@ static void nv30UpdateArbitrationSettings (
- *lwm = graphics_lwm >> 3;
- }
-
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- static inline uint32_t
- pciaccessReadLong(struct pci_device *const dev, pciaddr_t offset) {
- uint32_t tmp;
- @@ -670,7 +670,7 @@ static void nForceUpdateArbitrationSettings (
- NVPtr pNv
- )
- {
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- struct pci_device *const dev1 = pci_device_find_by_slot(0, 0, 0, 1);
- struct pci_device *const dev2 = pci_device_find_by_slot(0, 0, 0, 2);
- struct pci_device *const dev3 = pci_device_find_by_slot(0, 0, 0, 3);
- diff --git a/src/nv_setup.c b/src/nv_setup.c
- index 92ca3ec..8c57675 100644
- --- a/src/nv_setup.c
- +++ b/src/nv_setup.c
- @@ -287,7 +287,7 @@ static void nv10GetConfig (NVPtr pNv)
- }
- #endif
-
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- {
- /* [AGP]: I don't know if this is correct */
- struct pci_device *dev = pci_device_find_by_slot(0, 0, 0, 1);
- @@ -346,7 +346,7 @@ NVCommonSetup(ScrnInfoPtr pScrn)
- int FlatPanel = -1; /* really means the CRTC is slaved */
- Bool Television = FALSE;
- void *tmp;
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- int err;
- #endif
-
- @@ -378,7 +378,7 @@ NVCommonSetup(ScrnInfoPtr pScrn)
- pVga->MMIOBase = (CARD8 *)pNv;
- pVga->MMIOOffset = 0;
-
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- err = pci_device_map_range(pNv->PciInfo, pNv->IOAddress, 0x01000000,
- PCI_DEV_MAP_FLAG_WRITABLE, &tmp);
- if (err != 0) {
- diff --git a/src/nv_type.h b/src/nv_type.h
- index e705d4c..68ca210 100644
- --- a/src/nv_type.h
- +++ b/src/nv_type.h
- @@ -78,7 +78,7 @@ typedef struct {
- CARD32 Architecture;
- CARD32 CursorStart;
- EntityInfoPtr pEnt;
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- struct pci_device *PciInfo;
- #else
- pciVideoPtr PciInfo;
- diff --git a/src/riva_driver.c b/src/riva_driver.c
- index 759501e..910e63d 100644
- --- a/src/riva_driver.c
- +++ b/src/riva_driver.c
- @@ -825,7 +825,7 @@ RivaMapMem(ScrnInfoPtr pScrn)
- /*
- * Map IO registers to virtual address space
- */
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- void *tmp;
-
- pci_device_map_range(pRiva->PciInfo, pRiva->IOAddress, 0x1000000,
- @@ -890,7 +890,7 @@ RivaUnmapMem(ScrnInfoPtr pScrn)
- /*
- * Unmap IO registers to virtual address space
- */
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- pci_device_unmap_range(pRiva->PciInfo, pRiva->IOBase, 0x1000000);
- pci_device_unmap_range(pRiva->PciInfo, pRiva->FbBase, pRiva->FbMapSize);
- #else
- diff --git a/src/riva_setup.c b/src/riva_setup.c
- index 533f6e8..602e6dc 100644
- --- a/src/riva_setup.c
- +++ b/src/riva_setup.c
- @@ -233,7 +233,7 @@ Riva3Setup(ScrnInfoPtr pScrn)
- pRiva->riva.EnableIRQ = 0;
- pRiva->riva.IO = VGA_IOBASE_COLOR;
-
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- #define MAP(ptr, offset, size) { \
- void *tmp; \
- pci_device_map_range(pRiva->PciInfo, (offset), (size), \
- diff --git a/src/riva_type.h b/src/riva_type.h
- index 4adeb2b..ee999c8 100644
- --- a/src/riva_type.h
- +++ b/src/riva_type.h
- @@ -53,7 +53,7 @@ typedef struct {
- RIVA_HW_STATE SavedReg;
- RIVA_HW_STATE ModeReg;
- EntityInfoPtr pEnt;
- -#if XSERVER_LIBPCIACCESS
- +#if defined(XSERVER_LIBPCIACCESS)
- struct pci_device *PciInfo;
- #else
- pciVideoPtr PciInfo;
- diff --git a/src/nv_driver.c b/src/nv_driver.c
- index cf185f8..d35af55 100644
- --- a/src/nv_driver.c
- +++ b/src/nv_driver.c
- @@ -766,7 +766,7 @@ NVGetScrnInfoRec(PciChipsets *chips, int chip)
- pScrn->driverName = NV_DRIVER_NAME;
- pScrn->name = NV_NAME;
-
- -#if !XSERVER_LIBPCIACCESS
- +#ifndef XSERVER_LIBPCIACCESS
- pScrn->Probe = NVProbe;
- #endif
- pScrn->PreInit = NVPreInit;
- @@ -1390,7 +1390,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
-
- /* Find the PCI info for this screen */
- pNv->PciInfo = xf86GetPciInfoForEntity(pNv->pEnt->index);
- -#if !XSERVER_LIBPCIACCESS
- +#ifndef XSERVER_LIBPCIACCESS
- pNv->PciTag = pciTag(pNv->PciInfo->bus, pNv->PciInfo->device,
- pNv->PciInfo->func);
- #endif
- diff --git a/src/riva_driver.c b/src/riva_driver.c
- index 910e63d..a365380 100644
- --- a/src/riva_driver.c
- +++ b/src/riva_driver.c
- @@ -385,7 +385,7 @@ RivaPreInit(ScrnInfoPtr pScrn, int flags)
-
- /* Find the PCI info for this screen */
- pRiva->PciInfo = xf86GetPciInfoForEntity(pRiva->pEnt->index);
- -#if !XSERVER_LIBPCIACCESS
- +#ifndef XSERVER_LIBPCIACCESS
- pRiva->PciTag = pciTag(pRiva->PciInfo->bus, pRiva->PciInfo->device,
- pRiva->PciInfo->func);
- #endif
|