winsys/drm: check for CAPS2/SM41 support if VGPU10 is enabled

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>
This commit is contained in:
Charmaine Lee 2017-11-06 14:13:47 -08:00 committed by Brian Paul
parent 159e706c4c
commit 45517f492b

View 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,