summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2006-12-15 13:23:45 -0700
committerJordan Crouse <jordan.crouse@amd.com>2006-12-15 13:24:20 -0700
commitdc2244b398d68bb340e97c723615e3b52ecd47ae (patch)
tree949599dc507ed4248d0702cc74338c1b097fee29
parent5b66b41b1d91345700e8f18569fa984c6ce53aca (diff)
Clean up the VGA init
-rw-r--r--src/amd_gx_driver.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c
index acb41e1..38edad2 100644
--- a/src/amd_gx_driver.c
+++ b/src/amd_gx_driver.c
@@ -487,9 +487,8 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
pGeode->useVGA = FALSE;
if (xf86LoadSubModule(pScrni, "vgahw")) {
- if (vgaHWGetHWRec(pScrni)) {
+ if (vgaHWGetHWRec(pScrni)) {
pGeode->useVGA = GXCheckVGA(pScrni);
- ErrorF("VGA support is %d\n", pGeode->useVGA);
}
}
@@ -679,9 +678,6 @@ GXPreInit(ScrnInfoPtr pScrni, int flags)
}
#endif
- if (!xf86LoadSubModule(pScrni, "vgahw"))
- return FALSE;
-
xf86LoaderReqSymLists(amdVgahwSymbols, NULL);
pGeode->FBVGAActive = gu2_get_vga_active();
}
@@ -1090,7 +1086,6 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni)
if (pGeode->useVGA) {
vgaHWPtr pvgaHW = VGAHWPTR(pScrni);
-
pGeode->FBBIOSMode = pvgaHW->readCrtc(pvgaHW, 0x040);
}
@@ -1287,21 +1282,18 @@ GXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv)
int maj, min, ret, rotate;
BOOL shadowfb = TRUE;
- /* FIXME: VGA stuff - what does this do? */
-
- /*
- * if (pGeode->useVGA) {
- * if (!vgaHWGetHWRec(pScrni))
- * return FALSE;
- * if (!vgaHWMapMem(pScrni))
- * return FALSE;
- *
- * vgaHWGetIOBase(VGAHWPTR(pScrni));
- * }
- */
-
pGeode->starting = TRUE;
+ /* If we are using VGA then go ahead and map the memory */
+
+ if (pGeode->useVGA) {
+
+ if (!vgaHWMapMem(pScrni))
+ return FALSE;
+
+ vgaHWGetIOBase(VGAHWPTR(pScrni));
+ }
+
if (!pGeode->NoAccel) {
if (pGeode->useEXA) {