Revert local changes that are not needed anymore and that prevented

some of the patches to 0.9.5 to apply correctly.
This commit is contained in:
matthieu 2015-05-27 19:18:48 +00:00
parent 6635e75d8c
commit a86710db4a

View File

@ -105,8 +105,6 @@ Mach64Chipsets[] = {
{-1, NULL }
};
#ifndef XSERVER_LIBPCIACCESS
/*
* This table maps a PCI device ID to a chipset family identifier.
*/
@ -149,43 +147,43 @@ Mach64PciChipsets[] = {
{-1, -1, RES_UNDEFINED}
};
#else /* XSERVER_LIBPCIACCESS */
#ifdef XSERVER_LIBPCIACCESS
static const struct pci_id_match Mach64DeviceMatch[] = {
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GX, ATI_CHIP_88800GX),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64CX, ATI_CHIP_88800CX),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64CT, ATI_CHIP_264CT),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64ET, ATI_CHIP_264ET),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64VT, ATI_CHIP_264VT),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GT, ATI_CHIP_264GT),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64VU, ATI_CHIP_264VT3),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GU, ATI_CHIP_264GTDVD),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64LG, ATI_CHIP_264LT),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64VV, ATI_CHIP_264VT4),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GV, ATI_CHIP_264GT2C),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GW, ATI_CHIP_264GT2C),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GY, ATI_CHIP_264GT2C),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GZ, ATI_CHIP_264GT2C),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GB, ATI_CHIP_264GTPRO),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GD, ATI_CHIP_264GTPRO),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GI, ATI_CHIP_264GTPRO),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GP, ATI_CHIP_264GTPRO),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GQ, ATI_CHIP_264GTPRO),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64LB, ATI_CHIP_264LTPRO),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64LD, ATI_CHIP_264LTPRO),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64LI, ATI_CHIP_264LTPRO),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64LP, ATI_CHIP_264LTPRO),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64LQ, ATI_CHIP_264LTPRO),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GL, ATI_CHIP_264XL),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GM, ATI_CHIP_264XL),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GN, ATI_CHIP_264XL),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GO, ATI_CHIP_264XL),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GR, ATI_CHIP_264XL),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64GS, ATI_CHIP_264XL),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64LM, ATI_CHIP_MOBILITY),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64LN, ATI_CHIP_MOBILITY),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64LR, ATI_CHIP_MOBILITY),
ATI_DEVICE_MATCH(PCI_CHIP_MACH64LS, ATI_CHIP_MOBILITY),
static const struct pci_id_match mach64_device_match[] = {
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GX, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64CX, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64CT, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64ET, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64VT, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GT, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64VU, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GU, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64LG, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64VV, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GV, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GW, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GY, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GZ, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GB, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GD, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GI, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GP, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GQ, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64LB, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64LD, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64LI, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64LP, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64LQ, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GL, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GM, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GN, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GO, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GR, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64GS, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64LM, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64LN, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64LR, 0 ),
ATI_DEVICE_MATCH( PCI_CHIP_MACH64LS, 0 ),
{ 0, 0, 0 }
};
@ -212,6 +210,37 @@ Mach64Identify
"Driver for ATI Mach64 chipsets");
}
static Bool
mach64_get_scrninfo(int entity_num)
{
ScrnInfoPtr pScrn;
pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, Mach64PciChipsets,
0, 0, 0, 0, NULL);
if (!pScrn)
return FALSE;
pScrn->driverVersion = MACH64_VERSION_CURRENT;
pScrn->driverName = MACH64_DRIVER_NAME;
pScrn->name = MACH64_NAME;
#ifdef XSERVER_LIBPCIACCESS
pScrn->Probe = NULL;
#else
pScrn->Probe = Mach64Probe;
#endif
pScrn->PreInit = ATIPreInit;
pScrn->ScreenInit = ATIScreenInit;
pScrn->SwitchMode = ATISwitchMode;
pScrn->AdjustFrame = ATIAdjustFrame;
pScrn->EnterVT = ATIEnterVT;
pScrn->LeaveVT = ATILeaveVT;
pScrn->FreeScreen = ATIFreeScreen;
pScrn->ValidMode = ATIValidMode;
return TRUE;
}
#ifndef XSERVER_LIBPCIACCESS
/*
@ -223,7 +252,6 @@ Mach64Identify
static Bool
Mach64Probe(DriverPtr pDriver, int flags)
{
ScrnInfoPtr pScrn;
GDevPtr *devSections;
int *usedChips;
int numDevSections;
@ -252,26 +280,8 @@ Mach64Probe(DriverPtr pDriver, int flags)
ProbeSuccess = TRUE;
} else {
for (i = 0; i < numUsed; i++) {
pScrn = xf86ConfigPciEntity(NULL, 0, usedChips[i],
Mach64PciChipsets, 0, 0, 0, 0, NULL);
if (!pScrn)
continue;
pScrn->driverVersion = MACH64_VERSION_CURRENT;
pScrn->driverName = MACH64_DRIVER_NAME;
pScrn->name = MACH64_NAME;
pScrn->Probe = Mach64Probe;
pScrn->PreInit = ATIPreInit;
pScrn->ScreenInit = ATIScreenInit;
pScrn->SwitchMode = ATISwitchMode;
pScrn->AdjustFrame = ATIAdjustFrame;
pScrn->EnterVT = ATIEnterVT;
pScrn->LeaveVT = ATILeaveVT;
pScrn->FreeScreen = ATIFreeScreen;
pScrn->ValidMode = ATIValidMode;
ProbeSuccess = TRUE;
if (mach64_get_scrninfo(usedChips[i]))
ProbeSuccess = TRUE;
}
}
@ -283,42 +293,14 @@ Mach64Probe(DriverPtr pDriver, int flags)
#else /* XSERVER_LIBPCIACCESS */
static Bool
Mach64PciProbe(
mach64_pci_probe(
DriverPtr pDriver,
int entityNum,
struct pci_device *dev,
intptr_t matchData
int entity_num,
struct pci_device *device,
intptr_t match_data
)
{
ScrnInfoPtr pScrn;
ATIPtr pATI;
pScrn = xf86ConfigPciEntity(NULL, 0, entityNum, NULL,
RES_SHARED_VGA, NULL, NULL, NULL, NULL);
if (!pScrn)
return FALSE;
pScrn->driverVersion = MACH64_VERSION_CURRENT;
pScrn->driverName = MACH64_DRIVER_NAME;
pScrn->name = MACH64_NAME;
pScrn->Probe = NULL;
pScrn->PreInit = ATIPreInit;
pScrn->ScreenInit = ATIScreenInit;
pScrn->SwitchMode = ATISwitchMode;
pScrn->AdjustFrame = ATIAdjustFrame;
pScrn->EnterVT = ATIEnterVT;
pScrn->LeaveVT = ATILeaveVT;
pScrn->FreeScreen = ATIFreeScreen;
pScrn->ValidMode = ATIValidMode;
if (!ATIGetRec(pScrn))
return FALSE;
pATI = ATIPTR(pScrn);
pATI->Chip = matchData;
return TRUE;
return mach64_get_scrninfo(entity_num);
}
#endif /* XSERVER_LIBPCIACCESS */
@ -338,7 +320,7 @@ _X_EXPORT DriverRec MACH64 =
0,
NULL,
#ifdef XSERVER_LIBPCIACCESS
Mach64DeviceMatch,
Mach64PciProbe
mach64_device_match,
mach64_pci_probe
#endif
};