1 --- src/vmware.h 2018-05-11 17:43:24.776710047 +0200
2 +++ src/vmware.h.new 2018-05-11 17:45:16.599821536 +0200
7 -#if XSERVER_LIBPCIACCESS
8 +#ifdef XSERVER_LIBPCIACCESS
9 struct pci_device *PciInfo;
13 /* Undefine this to kill all acceleration */
14 #define ACCELERATE_OPS
16 -#if XSERVER_LIBPCIACCESS
17 +#ifdef XSERVER_LIBPCIACCESS
18 #define VENDOR_ID(p) (p)->vendor_id
19 #define DEVICE_ID(p) (p)->device_id
20 #define SUBVENDOR_ID(p) (p)->subvendor_id
21 --- src/vmware.c 2018-05-11 17:28:30.612158774 +0200
22 +++ src/vmware.c.new 2018-05-11 17:38:40.108785284 +0200
24 SVGA_LEGACY_BASE_PORT + SVGA_VALUE_PORT*sizeof(uint32);
26 /* Note: This setting of valueReg causes unaligned I/O */
27 -#if XSERVER_LIBPCIACCESS
28 +#ifdef XSERVER_LIBPCIACCESS
29 pVMWARE->portIOBase = pVMWARE->PciInfo->regions[0].base_addr;
31 pVMWARE->portIOBase = pVMWARE->PciInfo->ioBase[0];
34 pVMWARE->suspensionSavedRegId = id;
36 -#if !XSERVER_LIBPCIACCESS
37 +#ifndef XSERVER_LIBPCIACCESS
38 pVMWARE->PciTag = pciTag(pVMWARE->PciInfo->bus, pVMWARE->PciInfo->device,
39 pVMWARE->PciInfo->func);
42 VMWAREMapMem(ScrnInfoPtr pScrn)
44 VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
45 -#if XSERVER_LIBPCIACCESS
46 +#ifdef XSERVER_LIBPCIACCESS
48 struct pci_device *const device = pVMWARE->PciInfo;
52 -#if XSERVER_LIBPCIACCESS
53 +#ifdef XSERVER_LIBPCIACCESS
54 err = pci_device_map_range(device,
59 VmwareLog(("Unmapped: %p/%u\n", pVMWARE->FbBase, pVMWARE->videoRam));
61 -#if XSERVER_LIBPCIACCESS
62 +#ifdef XSERVER_LIBPCIACCESS
63 pci_device_unmap_range(pVMWARE->PciInfo, pVMWARE->FbBase, pVMWARE->videoRam);
65 xf86UnMapVidMem(pScrn->scrnIndex, pVMWARE->FbBase, pVMWARE->videoRam);
67 VMWAREInitFIFO(ScrnInfoPtr pScrn)
69 VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
70 -#if XSERVER_LIBPCIACCESS
71 +#ifdef XSERVER_LIBPCIACCESS
72 struct pci_device *const device = pVMWARE->PciInfo;
77 pVMWARE->mmioPhysBase = vmwareReadReg(pVMWARE, SVGA_REG_MEM_START);
78 pVMWARE->mmioSize = vmwareReadReg(pVMWARE, SVGA_REG_MEM_SIZE) & ~3;
79 -#if XSERVER_LIBPCIACCESS
80 +#ifdef XSERVER_LIBPCIACCESS
81 err = pci_device_map_range(device, pVMWARE->mmioPhysBase,
83 PCI_DEV_MAP_FLAG_WRITABLE,
87 vmwareWriteReg(pVMWARE, SVGA_REG_CONFIG_DONE, 0);
88 -#if XSERVER_LIBPCIACCESS
89 +#ifdef XSERVER_LIBPCIACCESS
90 pci_device_unmap_range(pVMWARE->PciInfo, pVMWARE->mmioVirtBase, pVMWARE->mmioSize);
92 xf86UnMapVidMem(pScrn->scrnIndex, pVMWARE->mmioVirtBase, pVMWARE->mmioSize);
93 --- src/vmware_bootstrap.c 2018-05-11 20:59:15.003530525 +0200
94 +++ src/vmware_bootstrap.c.new 2018-05-11 21:02:11.228289137 +0200
96 VMW_STRING(PACKAGE_VERSION_MAJOR) "." VMW_STRING(PACKAGE_VERSION_MINOR) \
97 "." VMW_STRING(PACKAGE_VERSION_PATCHLEVEL)
99 -#if !XSERVER_LIBPCIACCESS
100 +#ifndef XSERVER_LIBPCIACCESS
101 static const char VMWAREBuildStr[] = "VMware Guest X Server "
102 VMWARE_DRIVER_VERSION_STRING " - build=$Name$\n";
105 #define vmwareLegacyRes NULL
108 -#if XSERVER_LIBPCIACCESS
109 +#ifdef XSERVER_LIBPCIACCESS
110 #define VENDOR_ID(p) (p)->vendor_id
111 #define DEVICE_ID(p) (p)->device_id
112 #define SUBVENDOR_ID(p) (p)->subvendor_id
114 #define CHIP_REVISION(p) (p)->chipRev
117 -#if XSERVER_LIBPCIACCESS
118 +#ifdef XSERVER_LIBPCIACCESS
120 #define VMWARE_DEVICE_MATCH(d, i) \
121 {PCI_VENDOR_ID_VMWARE, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) }
124 VMwarePreinitStub(ScrnInfoPtr pScrn, int flags)
126 -#if XSERVER_LIBPCIACCESS
127 +#ifdef XSERVER_LIBPCIACCESS
128 struct pci_device *pciInfo;
132 return (*pScrn->PreInit)(pScrn, flags);
135 -#if XSERVER_LIBPCIACCESS
136 +#ifdef XSERVER_LIBPCIACCESS
138 VMwarePciProbe (DriverPtr drv,
141 VMWARE_DRIVER_VERSION,
144 -#if XSERVER_LIBPCIACCESS
145 +#ifdef XSERVER_LIBPCIACCESS
152 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 4
153 -#if XSERVER_LIBPCIACCESS
154 +#ifdef XSERVER_LIBPCIACCESS