winsys/drm: check for CAPS2/SM41 support if VGPU10 is enabled
authorCharmaine Lee <charmainel@vmware.com>
Mon, 6 Nov 2017 22:13:47 +0000 (14:13 -0800)
committerBrian Paul <brianp@vmware.com>
Mon, 10 Sep 2018 19:07:30 +0000 (13:07 -0600)
No need to check for HW_CAPS2 or SM4_1 support if VGPU10 is not
enabled or is explicitly disabled via the environment variable
SVGA_VGPU10.

Reviewed-by: Deepak Rawat <drawat@vmware.com>
src/gallium/winsys/svga/drm/vmw_screen_ioctl.c

index 94414e753423730bab021a433bf2a2ece0a75000..739e4ea131fb0959d5345144cda4023f26293e10 100644 (file)
@@ -1070,7 +1070,7 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws)
          }
       }
 
-      if (vws->ioctl.have_drm_2_15) {
+      if (vws->ioctl.have_drm_2_15 && vws->base.have_vgpu10) {
          memset(&gp_arg, 0, sizeof(gp_arg));
          gp_arg.param = DRM_VMW_PARAM_HW_CAPS2;
          ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GET_PARAM,