diff options
author | nolan <nolan> | 2004-08-14 01:03:55 +0000 |
---|---|---|
committer | nolan <nolan> | 2004-08-14 01:03:55 +0000 |
commit | 325df911a83e336d3463ea2220151af4e9f0ccfa (patch) | |
tree | 3ccfb5bd88e3e16d78b8cb2119e5c5918eb1d785 | |
parent | fed82eea7b64b645926c5102563887bc424245b7 (diff) |
Save the register state before we write to any of them. This makes therel-0-6-1lg3d-rel-0-7-0lg3d-rel-0-6-2lg3d-baseXORG-6_8_2XORG-6_8_1_904XORG-6_8_1_903XORG-6_8_1_902XORG-6_8_1_901XORG-6_8_1XORG-6_8_0XORG-6_7_99_904XORG-6_7_99_903XORG-6_7_99_902XORG-6_7_99_901
VMware driver coexist with VESA fbcon.
-rw-r--r-- | src/vmware.c | 24 |
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 */ |