summaryrefslogtreecommitdiff
path: root/extra/xf86-video-sisimedia/0009-update-for-rac-removal.patch
blob: df1421798d070bdba818c8bc9d12b6bc519b665a (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
From 9e1ebb9530bbb71be7fcab9e6f8f9a475be72efe Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Tue, 28 Jul 2009 03:32:37 +0000
Subject: sis: update for resources/RAC API removal

---
diff --git a/src/sis.h b/src/sis.h
index 773f709..e859c78 100644
--- a/src/sis.h
+++ b/src/sis.h
@@ -77,7 +77,9 @@
 #include "xf86Pci.h"
 #include "xf86Priv.h"
 #include "xf86_OSproc.h"
+#ifndef XSERVER_LIBPCIACCESS
 #include "xf86Resources.h"
+#endif
 #include "xf86.h"
 #include "xf86PciInfo.h"
 #include "xf86Cursor.h"
diff --git a/src/sis_driver.c b/src/sis_driver.c
index a1ced97..bb11cbb 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -49,7 +49,9 @@
 
 #include "sis.h"
 
+#ifndef XSERVER_LIBPCIACCESS
 #include "xf86RAC.h"
+#endif
 #include "dixstruct.h"
 #include "shadowfb.h"
 #include "fb.h"
@@ -3552,6 +3554,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
     SiS_MapVGAMem(pScrn);
 #endif
 
+#ifndef XSERVER_LIBPCIACCESS
     /* Set operating state */
 
     /* 1. memory */
@@ -3581,6 +3584,8 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
     /* Operations for which I/O access is required */
     pScrn->racIoFlags = RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
 
+#endif
+
     /* Load ramdac module */
     if(!xf86LoadSubModule(pScrn, "ramdac")) {
        SISErrorLog(pScrn, "Could not load ramdac module\n");
@@ -4424,6 +4429,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
     xf86DrvMsg(pScrn->scrnIndex, from, "MMIO registers at 0x%lX (size %ldK)\n",
 	   (ULong)pSiS->IOAddress, pSiS->mmioSize);
 
+#ifndef XSERVER_LIBPCIACCESS
     /* Register the PCI-assigned resources */
     if(xf86RegisterResources(pSiS->pEnt->index, NULL, ResExclusive)) {
        SISErrorLog(pScrn, "PCI resource conflicts detected\n");
@@ -4435,6 +4441,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
        SISFreeRec(pScrn);
        return FALSE;
     }
+#endif
 
     from = X_PROBED;
     if(pSiS->pEnt->device->videoRam != 0) {
--
cgit v0.8.3-6-g21f6