summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-07-30 11:19:35 +1000
committerDave Airlie <airlied@redhat.com>2009-07-30 11:19:35 +1000
commit457f84f373b33838355dbb059892c118bed51409 (patch)
tree4ff67e44952112a8c1188e50ed959ded681e8dab
parentc2d90960dcd57b1380266188ca7155e981b50bb9 (diff)
apm: fix up ABI properly
-rw-r--r--src/apm_driver.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/apm_driver.c b/src/apm_driver.c
index 3939dac..8dc3b3e 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -6,6 +6,10 @@
#include "apm.h"
#include "xf86cmap.h"
#include "shadowfb.h"
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
+#include "xf86Resources.h"
+#include "xf86RAC.h"
+#endif
#include "xf86int10.h"
#include "vbe.h"
@@ -786,6 +790,15 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
xf86FreeInt10(ptr);
}
+#ifndef XSERVER_LIBPCIACCESS
+ xf86RegisterResources(pEnt->index, NULL, ResNone);
+ xf86SetOperatingState(resVga, pEnt->index, ResDisableOpr);
+ pScrn->racMemFlags = 0; /* For noLinear, access to 0xA0000 */
+ if (pApm->VGAMap)
+ pScrn->racIoFlags = 0;
+ else
+ pScrn->racIoFlags = RAC_COLORMAP | RAC_VIEWPORT;
+#endif
if (pEnt->device->videoRam != 0) {
pScrn->videoRam = pEnt->device->videoRam;
from = X_CONFIG;