summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-07-28 13:32:31 +1000
committerDave Airlie <airlied@redhat.com>2009-07-28 13:32:31 +1000
commit26ca92acc58b74202ec5eacaffc8e418d878da5e (patch)
tree1391f8d3b715dbed6276d6138db10226f46d87c8
parentc1b8e89f367510958ffa8072ccbf416a13790c96 (diff)
mga: update for resources/RAC API removal
-rw-r--r--src/mga.h2
-rw-r--r--src/mga_bios.c1
-rw-r--r--src/mga_driver.c40
-rw-r--r--src/mga_esc.c2
-rw-r--r--src/mga_merge.c1
-rw-r--r--src/mga_shadow.c1
-rw-r--r--src/mga_video.c1
7 files changed, 25 insertions, 23 deletions
diff --git a/src/mga.h b/src/mga.h
index a831862..18652a8 100644
--- a/src/mga.h
+++ b/src/mga.h
@@ -464,9 +464,9 @@ typedef struct {
#else
pciVideoPtr PciInfo;
PCITAG PciTag;
+ xf86AccessRec Access;
#endif
const struct mga_device_attributes * chip_attribs;
- xf86AccessRec Access;
int Chipset;
int ChipRev;
diff --git a/src/mga_bios.c b/src/mga_bios.c
index c015077..b533dd1 100644
--- a/src/mga_bios.c
+++ b/src/mga_bios.c
@@ -41,7 +41,6 @@
/* All drivers should typically include these */
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86Resources.h"
/* All drivers need this */
diff --git a/src/mga_driver.c b/src/mga_driver.c
index d1e2210..1d0eb8e 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -52,7 +52,11 @@
/* All drivers should typically include these */
#include "xf86.h"
#include "xf86_OSproc.h"
+
+#ifndef XSERVER_LIBPCIACCESS
#include "xf86Resources.h"
+#include "xf86RAC.h"
+#endif
/* All drivers need this */
@@ -75,7 +79,7 @@
#include "micmap.h"
#include "xf86DDC.h"
-#include "xf86RAC.h"
+
#include "vbe.h"
#include "fb.h"
@@ -435,25 +439,25 @@ static SymTabRec MGAChipsets[] = {
};
static PciChipsets MGAPciChipsets[] = {
- { PCI_CHIP_MGA2064, PCI_CHIP_MGA2064, (resRange*)RES_SHARED_VGA },
- { PCI_CHIP_MGA1064, PCI_CHIP_MGA1064, (resRange*)RES_SHARED_VGA },
- { PCI_CHIP_MGA2164, PCI_CHIP_MGA2164, (resRange*)RES_SHARED_VGA },
- { PCI_CHIP_MGA2164_AGP, PCI_CHIP_MGA2164_AGP,(resRange*)RES_SHARED_VGA },
- { PCI_CHIP_MGAG100, PCI_CHIP_MGAG100, (resRange*)RES_SHARED_VGA },
- { PCI_CHIP_MGAG100_PCI, PCI_CHIP_MGAG100_PCI,(resRange*)RES_SHARED_VGA },
- { PCI_CHIP_MGAG200, PCI_CHIP_MGAG200, (resRange*)RES_SHARED_VGA },
- { PCI_CHIP_MGAG200_PCI, PCI_CHIP_MGAG200_PCI,(resRange*)RES_SHARED_VGA },
+ { PCI_CHIP_MGA2064, PCI_CHIP_MGA2064, RES_SHARED_VGA },
+ { PCI_CHIP_MGA1064, PCI_CHIP_MGA1064, RES_SHARED_VGA },
+ { PCI_CHIP_MGA2164, PCI_CHIP_MGA2164, RES_SHARED_VGA },
+ { PCI_CHIP_MGA2164_AGP, PCI_CHIP_MGA2164_AGP,RES_SHARED_VGA },
+ { PCI_CHIP_MGAG100, PCI_CHIP_MGAG100, RES_SHARED_VGA },
+ { PCI_CHIP_MGAG100_PCI, PCI_CHIP_MGAG100_PCI,RES_SHARED_VGA },
+ { PCI_CHIP_MGAG200, PCI_CHIP_MGAG200, RES_SHARED_VGA },
+ { PCI_CHIP_MGAG200_PCI, PCI_CHIP_MGAG200_PCI,RES_SHARED_VGA },
{ PCI_CHIP_MGAG200_SE_B_PCI, PCI_CHIP_MGAG200_SE_B_PCI,
- (resRange*)RES_SHARED_VGA },
+ RES_SHARED_VGA },
{ PCI_CHIP_MGAG200_SE_A_PCI, PCI_CHIP_MGAG200_SE_A_PCI,
- (resRange*)RES_SHARED_VGA },
+ RES_SHARED_VGA },
{ PCI_CHIP_MGAG200_EV_PCI, PCI_CHIP_MGAG200_EV_PCI,
- (resRange*)RES_SHARED_VGA },
+ RES_SHARED_VGA },
{ PCI_CHIP_MGAG200_WINBOND_PCI, PCI_CHIP_MGAG200_WINBOND_PCI,
- (resRange*)RES_SHARED_VGA },
- { PCI_CHIP_MGAG400, PCI_CHIP_MGAG400, (resRange*)RES_SHARED_VGA },
- { PCI_CHIP_MGAG550, PCI_CHIP_MGAG550, (resRange*)RES_SHARED_VGA },
- { -1, -1, (resRange*)RES_UNDEFINED }
+ RES_SHARED_VGA },
+ { PCI_CHIP_MGAG400, PCI_CHIP_MGAG400, RES_SHARED_VGA },
+ { PCI_CHIP_MGAG550, PCI_CHIP_MGAG550, RES_SHARED_VGA },
+ { -1, -1, RES_UNDEFINED }
};
/*
@@ -1514,8 +1518,10 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
pMga->Primary = xf86IsPrimaryPci(pMga->PciInfo);
#ifndef DISABLE_VGA_IO
+#ifndef XSERVER_LIBPCIACCESS
xf86SetOperatingState(resVgaIo, pMga->pEnt->index, ResUnusedOpr);
xf86SetOperatingState(resVgaMem, pMga->pEnt->index, ResDisableOpr);
+#endif
#else
/*
* Set our own access functions, which control the vgaioen bit.
@@ -1772,12 +1778,14 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
}
#endif
+#ifndef XSERVER_LIBPCIACCESS
if (xf86RegisterResources(pMga->pEnt->index, NULL, ResExclusive)) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"xf86RegisterResources() found resource conflicts\n");
MGAFreeRec(pScrn);
return FALSE;
}
+#endif
/*
* The first thing we should figure out is the depth, bpp, etc.
diff --git a/src/mga_esc.c b/src/mga_esc.c
index 47b36a8..e811712 100644
--- a/src/mga_esc.c
+++ b/src/mga_esc.c
@@ -15,7 +15,6 @@
/* All drivers should typically include these */
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86Resources.h"
/* All drivers need this */
@@ -36,7 +35,6 @@
#include "micmap.h"
#include "xf86DDC.h"
-#include "xf86RAC.h"
#include "vbe.h"
#include "fb.h"
diff --git a/src/mga_merge.c b/src/mga_merge.c
index 24bcbc1..4cfa0a7 100644
--- a/src/mga_merge.c
+++ b/src/mga_merge.c
@@ -5,7 +5,6 @@
/* All drivers should typically include these */
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86Resources.h"
/* All drivers need this */
diff --git a/src/mga_shadow.c b/src/mga_shadow.c
index 4dc03d3..f928690 100644
--- a/src/mga_shadow.c
+++ b/src/mga_shadow.c
@@ -9,7 +9,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86Resources.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"
#include "mga_reg.h"
diff --git a/src/mga_video.c b/src/mga_video.c
index bf60c1d..a69c973 100644
--- a/src/mga_video.c
+++ b/src/mga_video.c
@@ -4,7 +4,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86Resources.h"
#include "compiler.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"