diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2012-02-02 10:24:26 +0100 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2012-02-02 10:32:13 +0100 |
commit | ecf6c5b1081e70ec64132a8188c8cc15945c2290 (patch) | |
tree | 5eb5811b52cb69bc3cba424843cd5cdf7f1ab204 | |
parent | 3e18d43c7f8ab5dcb94ac285a687eaaa1a578250 (diff) |
vmware: Kill warnings on Xserver 1.12
Compile-tested on servers 1.0 through 1.12.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/vmware.c | 5 | ||||
-rw-r--r-- | src/vmware.h | 8 | ||||
-rw-r--r-- | src/vmware_bootstrap.c | 35 |
4 files changed, 17 insertions, 33 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 64a9069..1f54168 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,7 @@ vmware_drv_la_LTLIBRARIES = vmware_drv.la vmware_drv_la_LDFLAGS = -module -avoid-version -vmware_drv_la_CFLAGS = @XORG_CFLAGS@ +vmware_drv_la_CFLAGS = $(CWARNFLAGS) @XORG_CFLAGS@ vmware_drv_ladir = @moduledir@/drivers vmware_drv_la_LIBADD = @VMWGFX_LIBADD@ vmware_drv_la_DEPENDENCIES = @VMWGFX_LIBADD@ diff --git a/src/vmware.c b/src/vmware.c index 5eb2bf9..e29822f 100644 --- a/src/vmware.c +++ b/src/vmware.c @@ -20,7 +20,6 @@ char rcsId_vmware[] = #include "compiler.h" /* inb/outb */ -#include "xf86PciInfo.h" /* pci vendor id */ #include "xf86Pci.h" /* pci */ #include "mipointer.h" /* sw cursor */ @@ -286,7 +285,7 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags) uint32 id; int i; ClockRange* clockRanges; - IOADDRESS domainIOBase = 0; + unsigned long domainIOBase = 0; uint32 width = 0, height = 0; Bool defaultMode; @@ -320,7 +319,7 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags) return FALSE; } - if (DEVICE_ID(pVMWARE->PciInfo) == PCI_CHIP_VMWARE0710) { + if (DEVICE_ID(pVMWARE->PciInfo) == PCI_DEVICE_ID_VMWARE_SVGA) { pVMWARE->indexReg = domainIOBase + SVGA_LEGACY_BASE_PORT + SVGA_INDEX_PORT*sizeof(uint32); pVMWARE->valueReg = domainIOBase + diff --git a/src/vmware.h b/src/vmware.h index 632796e..458390a 100644 --- a/src/vmware.h +++ b/src/vmware.h @@ -29,7 +29,6 @@ #include "compiler.h" /* inb/outb */ -#include "xf86PciInfo.h" /* pci vendor id */ #include "xf86Pci.h" /* pci */ #include "xf86Cursor.h" /* hw cursor */ #include "cursorstr.h" /* xhot/yhot */ @@ -43,13 +42,14 @@ #include "svga_reg.h" #include "svga_struct.h" #include "vmware_bootstrap.h" +#include <xf86Module.h> #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 #define _swapl(x, n) swapl(x,n) #define _swaps(x, n) swaps(x,n) #else -#define _swapl(x, n) swapl(x) -#define _swaps(x, n) swaps(x) +#define _swapl(x, n) (void) n; swapl(x) +#define _swaps(x, n) (void) n; swaps(x) #endif /* @@ -151,7 +151,7 @@ typedef struct { uint32 sourcePixmap[SVGA_PIXMAP_SIZE(MAX_CURS, MAX_CURS, 32)]; } hwcur; - IOADDRESS indexReg, valueReg; + unsigned long indexReg, valueReg; ScreenRec ScrnFuncs; diff --git a/src/vmware_bootstrap.c b/src/vmware_bootstrap.c index 2f21c2a..ea5be19 100644 --- a/src/vmware_bootstrap.c +++ b/src/vmware_bootstrap.c @@ -31,7 +31,6 @@ #include "xf86.h" #include "compiler.h" -#include "xf86PciInfo.h" /* pci vendor id */ #include "xf86Pci.h" /* pci */ #include "vm_device_version.h" #include "vmware_bootstrap.h" @@ -70,20 +69,6 @@ #endif /* - * Sanity check that xf86PciInfo.h has the correct values (which come from - * the VMware source tree in vm_device_version.h. - */ -#if PCI_CHIP_VMWARE0405 != PCI_DEVICE_ID_VMWARE_SVGA2 -#error "PCI_CHIP_VMWARE0405 is wrong, update it from vm_device_version.h" -#endif -#if PCI_CHIP_VMWARE0710 != PCI_DEVICE_ID_VMWARE_SVGA -#error "PCI_CHIP_VMWARE0710 is wrong, update it from vm_device_version.h" -#endif -#if PCI_VENDOR_VMWARE != PCI_VENDOR_ID_VMWARE -#error "PCI_VENDOR_VMWARE is wrong, update it from vm_device_version.h" -#endif - -/* * This is the only way I know to turn a #define of an integer constant into * a constant string. */ @@ -147,11 +132,11 @@ static resRange vmwareLegacyRes[] = { #if XSERVER_LIBPCIACCESS #define VMWARE_DEVICE_MATCH(d, i) \ - {PCI_VENDOR_VMWARE, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) } + {PCI_VENDOR_ID_VMWARE, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) } static const struct pci_id_match VMwareDeviceMatch[] = { - VMWARE_DEVICE_MATCH (PCI_CHIP_VMWARE0405, 0 ), - VMWARE_DEVICE_MATCH (PCI_CHIP_VMWARE0710, 0 ), + VMWARE_DEVICE_MATCH (PCI_DEVICE_ID_VMWARE_SVGA2, 0 ), + VMWARE_DEVICE_MATCH (PCI_DEVICE_ID_VMWARE_SVGA, 0 ), { 0, 0, 0 }, }; #endif @@ -164,14 +149,14 @@ static const struct pci_id_match VMwareDeviceMatch[] = { */ static PciChipsets VMWAREPciChipsets[] = { - { PCI_CHIP_VMWARE0405, PCI_CHIP_VMWARE0405, RES_EXCLUSIVE_VGA }, - { PCI_CHIP_VMWARE0710, PCI_CHIP_VMWARE0710, vmwareLegacyRes }, + { PCI_DEVICE_ID_VMWARE_SVGA2, PCI_DEVICE_ID_VMWARE_SVGA2, RES_EXCLUSIVE_VGA }, + { PCI_DEVICE_ID_VMWARE_SVGA, PCI_DEVICE_ID_VMWARE_SVGA, vmwareLegacyRes }, { -1, -1, RES_UNDEFINED } }; static SymTabRec VMWAREChipsets[] = { - { PCI_CHIP_VMWARE0405, "vmware0405" }, - { PCI_CHIP_VMWARE0710, "vmware0710" }, + { PCI_DEVICE_ID_VMWARE_SVGA2, "vmware0405" }, + { PCI_DEVICE_ID_VMWARE_SVGA, "vmware0710" }, { -1, NULL } }; @@ -284,8 +269,8 @@ VMwarePciProbe (DriverPtr drv, entity = xf86GetEntityInfo(entity_num); switch (DEVICE_ID(device)) { - case PCI_CHIP_VMWARE0405: - case PCI_CHIP_VMWARE0710: + case PCI_DEVICE_ID_VMWARE_SVGA2: + case PCI_DEVICE_ID_VMWARE_SVGA: xf86MsgVerb(X_INFO, 4, "VMwarePciProbe: Valid device\n"); #ifdef BUILD_VMWGFX @@ -372,7 +357,7 @@ VMWAREProbe(DriverPtr drv, int flags) } if (xf86GetPciVideoInfo()) { VmwareLog(("Some PCI Video Info Exists\n")); - numUsed = xf86MatchPciInstances(VMWARE_NAME, PCI_VENDOR_VMWARE, + numUsed = xf86MatchPciInstances(VMWARE_NAME, PCI_VENDOR_ID_VMWARE, VMWAREChipsets, VMWAREPciChipsets, devSections, numDevSections, drv, &usedChips); free(devSections); |