]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
resolutionKMS: Add support for the svga3 device
authorJohn Wolfe <jwolfe@vmware.com>
Mon, 20 Sep 2021 15:07:36 +0000 (08:07 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Mon, 20 Sep 2021 15:07:36 +0000 (08:07 -0700)
The resolution plugin was checking for only the svga2 device, which
does not exist on ARM.  This makes the resolution plugin work on ARM.

open-vm-tools/services/plugins/resolutionSet/resolutionCommon.c
open-vm-tools/vmwgfxctrl/main.c

index 1b5c989f2ca2e3bbc314a8c0209e483dcd26092e..e4c3f4efc529ae7204ecf2f66da708a59a3625a5 100644 (file)
@@ -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);
index b0749dfcc3180dab877e14751af4540bc157d6f5..4adb7a50e2d1ab1272f9529c06d93bce099086ee 100644 (file)
@@ -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;
       }