};
static void VMWAREStopFIFO(ScrnInfoPtr pScrn);
+static void VMWARESave(ScrnInfoPtr pScrn);
static Bool
VMWAREGetRec(ScrnInfoPtr pScrn)
"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;
}
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);
hwp = VGAHWPTR(pScrn);
vgaHWGetIOBase(hwp);
- /* Save the current video state */
- VMWARESave(pScrn);
-
VMWAREInitFIFO(pScrn);
/* Initialise the first mode */