From: John Wolfe Date: Mon, 20 Sep 2021 15:07:36 +0000 (-0700) Subject: resolutionKMS: Add support for the svga3 device X-Git-Tag: stable-12.0.0~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3e4fd4e4692e36b5b66b5feb4044faa41d46f22;p=thirdparty%2Fopen-vm-tools.git resolutionKMS: Add support for the svga3 device The resolution plugin was checking for only the svga2 device, which does not exist on ARM. This makes the resolution plugin work on ARM. --- diff --git a/open-vm-tools/services/plugins/resolutionSet/resolutionCommon.c b/open-vm-tools/services/plugins/resolutionSet/resolutionCommon.c index 1b5c989f2..e4c3f4efc 100644 --- a/open-vm-tools/services/plugins/resolutionSet/resolutionCommon.c +++ b/open-vm-tools/services/plugins/resolutionSet/resolutionCommon.c @@ -37,7 +37,8 @@ /* The DRM device we are looking for */ #define RESOLUTION_VENDOR "0x15ad" -#define RESOLUTION_DEVICE "0x0405" +#define RESOLUTION_SVGA2_DEVICE "0x0405" +#define RESOLUTION_SVGA3_DEVICE "0x0406" #define RESOLUTION_KERNELNAME "vmwgfx" /* Required DRM version for resolutionKMS */ @@ -121,8 +122,9 @@ resolutionOpenDRM(const char *node) // IN: Device node base name. if (!vendor || !device) goto skipCheck; - if (strcmp(vendor, RESOLUTION_VENDOR) || - strcmp(device, RESOLUTION_DEVICE)) + if (strcmp(vendor, RESOLUTION_VENDOR) != 0 || + (strcmp(device, RESOLUTION_SVGA2_DEVICE) != 0 && + strcmp(device, RESOLUTION_SVGA3_DEVICE) != 0)) goto skipCheck; devNode = udev_device_get_devnode(dev); diff --git a/open-vm-tools/vmwgfxctrl/main.c b/open-vm-tools/vmwgfxctrl/main.c index b0749dfcc..4adb7a50e 100644 --- a/open-vm-tools/vmwgfxctrl/main.c +++ b/open-vm-tools/vmwgfxctrl/main.c @@ -59,7 +59,8 @@ /* The DRM device we are looking for */ #define VMWGFXCTRL_VENDOR "0x15ad" -#define VMWGFXCTRL_DEVICE "0x0405" +#define VMWGFXCTRL_SVGA2_DEVICE "0x0405" +#define VMWGFXCTRL_SVGA3_DEVICE "0x0406" #define VMWGFXCTRL_KERNELNAME "vmwgfx" /* Required DRM version for resolutionKMS */ @@ -136,7 +137,8 @@ vmwgfxOpenDRM(const char *node) // IN: Device node base name. } if (strcmp(vendor, VMWGFXCTRL_VENDOR) != 0 || - strcmp(device, VMWGFXCTRL_DEVICE) != 0) { + (strcmp(device, VMWGFXCTRL_SVGA2_DEVICE) != 0 && + strcmp(device, VMWGFXCTRL_SVGA3_DEVICE) != 0)) { goto skipCheck; }