summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornolan <nolan>2004-08-14 01:03:55 +0000
committernolan <nolan>2004-08-14 01:03:55 +0000
commit325df911a83e336d3463ea2220151af4e9f0ccfa (patch)
tree3ccfb5bd88e3e16d78b8cb2119e5c5918eb1d785
parentfed82eea7b64b645926c5102563887bc424245b7 (diff)
VMware driver coexist with VESA fbcon.
-rw-r--r--src/vmware.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/vmware.c b/src/vmware.c
index baa302d..15363e4 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -151,6 +151,7 @@ static const OptionInfoRec VMWAREOptions[] = {
};
static void VMWAREStopFIFO(ScrnInfoPtr pScrn);
+static void VMWARESave(ScrnInfoPtr pScrn);
static Bool
VMWAREGetRec(ScrnInfoPtr pScrn)
@@ -435,13 +436,6 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags)
"VMware SVGA regs at (0x%04lx, 0x%04lx)\n",
pVMWARE->indexReg, pVMWARE->valueReg);
- id = VMXGetVMwareSvgaId(pVMWARE);
- if (id == SVGA_ID_0 || id == SVGA_ID_INVALID) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "No supported VMware SVGA found (read ID 0x%08x).\n", id);
- return FALSE;
- }
-
if (!xf86LoadSubModule(pScrn, "vgahw")) {
return FALSE;
}
@@ -452,6 +446,19 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags)
return FALSE;
}
+ /*
+ * Save the current video state. Do it here before VMXGetVMwareSvgaId
+ * writes to any registers.
+ */
+ VMWARESave(pScrn);
+
+ id = VMXGetVMwareSvgaId(pVMWARE);
+ if (id == SVGA_ID_0 || id == SVGA_ID_INVALID) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "No supported VMware SVGA found (read ID 0x%08x).\n", id);
+ return FALSE;
+ }
+
pVMWARE->PciTag = pciTag(pVMWARE->PciInfo->bus, pVMWARE->PciInfo->device,
pVMWARE->PciInfo->func);
pVMWARE->Primary = xf86IsPrimaryPci(pVMWARE->PciInfo);
@@ -1124,9 +1131,6 @@ VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
hwp = VGAHWPTR(pScrn);
vgaHWGetIOBase(hwp);
- /* Save the current video state */
- VMWARESave(pScrn);
-
VMWAREInitFIFO(pScrn);
/* Initialise the first mode */