158 lines
4.7 KiB
Diff
158 lines
4.7 KiB
Diff
--- src/vmware.h 2018-05-11 17:43:24.776710047 +0200
|
|
+++ src/vmware.h.new 2018-05-11 17:45:16.599821536 +0200
|
|
@@ -83,7 +83,7 @@
|
|
|
|
typedef struct {
|
|
EntityInfoPtr pEnt;
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
struct pci_device *PciInfo;
|
|
#else
|
|
pciVideoPtr PciInfo;
|
|
@@ -207,7 +207,7 @@
|
|
/* Undefine this to kill all acceleration */
|
|
#define ACCELERATE_OPS
|
|
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
#define VENDOR_ID(p) (p)->vendor_id
|
|
#define DEVICE_ID(p) (p)->device_id
|
|
#define SUBVENDOR_ID(p) (p)->subvendor_id
|
|
--- src/vmware.c 2018-05-11 17:28:30.612158774 +0200
|
|
+++ src/vmware.c.new 2018-05-11 17:38:40.108785284 +0200
|
|
@@ -341,7 +341,7 @@
|
|
SVGA_LEGACY_BASE_PORT + SVGA_VALUE_PORT*sizeof(uint32);
|
|
} else {
|
|
/* Note: This setting of valueReg causes unaligned I/O */
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
pVMWARE->portIOBase = pVMWARE->PciInfo->regions[0].base_addr;
|
|
#else
|
|
pVMWARE->portIOBase = pVMWARE->PciInfo->ioBase[0];
|
|
@@ -383,7 +383,7 @@
|
|
}
|
|
pVMWARE->suspensionSavedRegId = id;
|
|
|
|
-#if !XSERVER_LIBPCIACCESS
|
|
+#ifndef XSERVER_LIBPCIACCESS
|
|
pVMWARE->PciTag = pciTag(pVMWARE->PciInfo->bus, pVMWARE->PciInfo->device,
|
|
pVMWARE->PciInfo->func);
|
|
#endif
|
|
@@ -727,13 +727,13 @@
|
|
VMWAREMapMem(ScrnInfoPtr pScrn)
|
|
{
|
|
VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
int err;
|
|
struct pci_device *const device = pVMWARE->PciInfo;
|
|
void *fbBase;
|
|
#endif
|
|
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
err = pci_device_map_range(device,
|
|
pVMWARE->memPhysBase,
|
|
pVMWARE->videoRam,
|
|
@@ -770,7 +770,7 @@
|
|
|
|
VmwareLog(("Unmapped: %p/%u\n", pVMWARE->FbBase, pVMWARE->videoRam));
|
|
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
pci_device_unmap_range(pVMWARE->PciInfo, pVMWARE->FbBase, pVMWARE->videoRam);
|
|
#else
|
|
xf86UnMapVidMem(pScrn->scrnIndex, pVMWARE->FbBase, pVMWARE->videoRam);
|
|
@@ -1045,7 +1045,7 @@
|
|
VMWAREInitFIFO(ScrnInfoPtr pScrn)
|
|
{
|
|
VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
struct pci_device *const device = pVMWARE->PciInfo;
|
|
int err;
|
|
void *mmioVirtBase;
|
|
@@ -1058,7 +1058,7 @@
|
|
|
|
pVMWARE->mmioPhysBase = vmwareReadReg(pVMWARE, SVGA_REG_MEM_START);
|
|
pVMWARE->mmioSize = vmwareReadReg(pVMWARE, SVGA_REG_MEM_SIZE) & ~3;
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
err = pci_device_map_range(device, pVMWARE->mmioPhysBase,
|
|
pVMWARE->mmioSize,
|
|
PCI_DEV_MAP_FLAG_WRITABLE,
|
|
@@ -1099,7 +1099,7 @@
|
|
TRACEPOINT
|
|
|
|
vmwareWriteReg(pVMWARE, SVGA_REG_CONFIG_DONE, 0);
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
pci_device_unmap_range(pVMWARE->PciInfo, pVMWARE->mmioVirtBase, pVMWARE->mmioSize);
|
|
#else
|
|
xf86UnMapVidMem(pScrn->scrnIndex, pVMWARE->mmioVirtBase, pVMWARE->mmioSize);
|
|
--- src/vmware_bootstrap.c 2018-05-11 20:59:15.003530525 +0200
|
|
+++ src/vmware_bootstrap.c.new 2018-05-11 21:02:11.228289137 +0200
|
|
@@ -91,7 +91,7 @@
|
|
VMW_STRING(PACKAGE_VERSION_MAJOR) "." VMW_STRING(PACKAGE_VERSION_MINOR) \
|
|
"." VMW_STRING(PACKAGE_VERSION_PATCHLEVEL)
|
|
|
|
-#if !XSERVER_LIBPCIACCESS
|
|
+#ifndef XSERVER_LIBPCIACCESS
|
|
static const char VMWAREBuildStr[] = "VMware Guest X Server "
|
|
VMWARE_DRIVER_VERSION_STRING " - build=$Name$\n";
|
|
#else
|
|
@@ -127,7 +127,7 @@
|
|
#define vmwareLegacyRes NULL
|
|
#endif
|
|
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
#define VENDOR_ID(p) (p)->vendor_id
|
|
#define DEVICE_ID(p) (p)->device_id
|
|
#define SUBVENDOR_ID(p) (p)->subvendor_id
|
|
@@ -141,7 +141,7 @@
|
|
#define CHIP_REVISION(p) (p)->chipRev
|
|
#endif
|
|
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
|
|
#define VMWARE_DEVICE_MATCH(d, i) \
|
|
{PCI_VENDOR_ID_VMWARE, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) }
|
|
@@ -220,7 +220,7 @@
|
|
static Bool
|
|
VMwarePreinitStub(ScrnInfoPtr pScrn, int flags)
|
|
{
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
struct pci_device *pciInfo;
|
|
#else
|
|
pciVideoPtr pciInfo;
|
|
@@ -270,7 +270,7 @@
|
|
return (*pScrn->PreInit)(pScrn, flags);
|
|
};
|
|
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
static Bool
|
|
VMwarePciProbe (DriverPtr drv,
|
|
int entity_num,
|
|
@@ -520,7 +520,7 @@
|
|
VMWARE_DRIVER_VERSION,
|
|
vmware_driver_name,
|
|
VMWAREIdentify,
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
NULL,
|
|
#else
|
|
VMWAREProbe,
|
|
@@ -532,7 +532,7 @@
|
|
VMWareDriverFunc,
|
|
#endif
|
|
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 4
|
|
-#if XSERVER_LIBPCIACCESS
|
|
+#ifdef XSERVER_LIBPCIACCESS
|
|
VMwareDeviceMatch,
|
|
VMwarePciProbe,
|
|
#else
|