summarylogtreecommitdiffstats
path: root/xserver117.patch
blob: 4e7e28ebcc96ce8b28682a65332658c27da3cb22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Index: xserver-xorg-video-sisimedia-0.9.1/src/sis_driver.c
===================================================================
--- xserver-xorg-video-sisimedia-0.9.1.orig/src/sis_driver.c
+++ xserver-xorg-video-sisimedia-0.9.1/src/sis_driver.c
@@ -3201,12 +3201,14 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 
     /* Find the PCI info for this screen */
     pSiS->PciInfo = xf86GetPciInfoForEntity(pSiS->pEnt->index);
-    pSiS->PciBus = PCI_CFG_BUS(pSiS->PciInfo);    
-    pSiS->PciDevice = PCI_CFG_DEV(pSiS->PciInfo); 
-    pSiS->PciFunc = PCI_CFG_FUNC(pSiS->PciInfo); 
-    pSiS->PciTag = pciTag(	PCI_DEV_BUS(pSiS->PciInfo), 
+    pSiS->PciBus = PCI_CFG_BUS(pSiS->PciInfo);
+    pSiS->PciDevice = PCI_CFG_DEV(pSiS->PciInfo);
+    pSiS->PciFunc = PCI_CFG_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
     /********************************************/
@@ -4047,7 +4049,9 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
 #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;
@@ -6048,7 +6052,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
Index: xserver-xorg-video-sisimedia-0.9.1/src/sis.h
===================================================================
--- xserver-xorg-video-sisimedia-0.9.1.orig/src/sis.h
+++ xserver-xorg-video-sisimedia-0.9.1/src/sis.h
@@ -1046,9 +1046,8 @@ typedef struct {
     struct pci_device *PciInfo;
 #else
     pciVideoPtr		PciInfo;
+   PCITAG              PciTag;
 #endif
-    
-    PCITAG		PciTag;
 
     int			PciBus, PciDevice, PciFunc;
     EntityInfoPtr	pEnt;
Index: xserver-xorg-video-sisimedia-0.9.1/src/vgatypes.h
===================================================================
--- xserver-xorg-video-sisimedia-0.9.1.orig/src/vgatypes.h
+++ xserver-xorg-video-sisimedia-0.9.1/src/vgatypes.h
@@ -80,14 +80,14 @@ typedef unsigned long SISIOADDRESS;
 #endif
 #endif
 
-#ifdef SIS_XORG_XF86
-#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,0,0,0)
+//#ifdef SIS_XORG_XF86
+//#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,0,0,0)
 typedef unsigned long IOADDRESS;
 typedef unsigned long SISIOADDRESS;
-#else
+//#else
 typedef IOADDRESS SISIOADDRESS;
-#endif
-#endif
+//#endif
+//#endif
 
 typedef enum _SIS_CHIP_TYPE {
     SIS_VGALegacy = 0,
Index: xserver-xorg-video-sisimedia-0.9.1/src/vstruct.h
===================================================================
--- xserver-xorg-video-sisimedia-0.9.1.orig/src/vstruct.h
+++ xserver-xorg-video-sisimedia-0.9.1/src/vstruct.h
@@ -241,8 +241,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