diff options
author | Dave Airlie <airlied@redhat.com> | 2009-07-28 13:32:31 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-07-28 13:32:31 +1000 |
commit | 26ca92acc58b74202ec5eacaffc8e418d878da5e (patch) | |
tree | 1391f8d3b715dbed6276d6138db10226f46d87c8 /src/mga_driver.c | |
parent | c1b8e89f367510958ffa8072ccbf416a13790c96 (diff) |
mga: update for resources/RAC API removal
Diffstat (limited to 'src/mga_driver.c')
-rw-r--r-- | src/mga_driver.c | 40 |
1 files changed, 24 insertions, 16 deletions
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. |