Merge from upstreams in preparation for xserver 1.17

This commit is contained in:
matthieu 2015-08-23 17:43:11 +00:00
parent c9ee5288a7
commit 4652b3c87b
3 changed files with 14 additions and 1 deletions

View File

@ -1005,7 +1005,9 @@ typedef struct {
ScrnInfoPtr pScrn;
pciVideoPtr PciInfo;
int PciBus, PciDevice, PciFunc;
#ifndef XSERVER_LIBPCIACCESS
PCITAG PciTag;
#endif
EntityInfoPtr pEnt;
int Chipset;
unsigned char ChipType;

View File

@ -3275,10 +3275,11 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
pSiS->PciDevice = PCI_CFG_DEV(pSiS->PciInfo); /*SIS_PCI_DEVICE(pSiS->PciInfo);*/
pSiS->PciFunc = PCI_CFG_FUNC(pSiS->PciInfo); /*SIS_PCI_FUNC(pSiS->PciInfo);*/
#ifndef XSERVER_LIBPCIACCESS
pSiS->PciTag = pciTag(PCI_DEV_BUS(pSiS->PciInfo),
PCI_DEV_DEV(pSiS->PciInfo),
PCI_DEV_FUNC(pSiS->PciInfo));
#endif
#ifdef SIS_NEED_MAP_IOP
/********************************************/
/* THIS IS BROKEN AND WON'T WORK */
@ -3901,7 +3902,9 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
if(pSiSEnt) pSiSEnt->SiS_Pr = pSiS->SiS_Pr;
#endif
memset(pSiS->SiS_Pr, 0, sizeof(struct SiS_Private));
#ifndef XSERVER_LIBPCIACCESS
pSiS->SiS_Pr->PciTag = pSiS->PciTag;
#endif
pSiS->SiS_Pr->ChipType = pSiS->ChipType;
pSiS->SiS_Pr->ChipRevision = pSiS->ChipRev;
pSiS->SiS_Pr->SiS_Backup70xx = 0xff;
@ -7130,7 +7133,9 @@ static Bool
SISMapMem(ScrnInfoPtr pScrn)
{
SISPtr pSiS = SISPTR(pScrn);
#ifndef XSERVER_LIBPCIACCESS
int mmioFlags = VIDMEM_MMIO;
#endif
#ifdef SISDUALHEAD
SISEntPtr pSiSEnt = pSiS->entityPrivate;
#endif
@ -7141,8 +7146,10 @@ SISMapMem(ScrnInfoPtr pScrn)
* byte/short access.)
*/
#if defined(__alpha__)
#ifndef XSERVER_LIBPCIACCESS
mmioFlags |= VIDMEM_SPARSE;
#endif
#endif
#ifdef SISDUALHEAD
if(pSiS->DualHeadMode) {
@ -13993,6 +14000,7 @@ SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn, UShort offset, UChar value)
break;
}
#ifndef XSERVER_LIBPCIACCESS
#ifdef SIS_USE_BIOS_SCRATCH
if(SISPTR(pScrn)->Primary) {
base = xf86MapVidMem(pScrn->scrnIndex, VIDMEM_MMIO, 0, 0x2000);
@ -14010,6 +14018,7 @@ SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn, UShort offset, UChar value)
xf86UnMapVidMem(pScrn->scrnIndex, base, 0x2000);
}
#endif
#endif
return ret;
}

View File

@ -237,8 +237,10 @@ struct SiS_Private
unsigned char ChipType;
unsigned char ChipRevision;
#ifdef SIS_XORG_XF86
#ifndef XSERVER_LIBPCIACCESS
PCITAG PciTag;
#endif
#endif
#ifdef SIS_LINUX_KERNEL
void *ivideo;
#endif