if (vws->base.have_gb_objects && !drm_gb_capable)
goto out_no_3d;
- /*
- * CAP2 functionality is not yet in vmwgfx. Till then, avoiding
- * this code path.
- */
- vws->base.have_intra_surface_copy = FALSE;
-
vws->base.have_vgpu10 = FALSE;
vws->base.have_sm4_1 = FALSE;
+ vws->base.have_intra_surface_copy = FALSE;
if (vws->base.have_gb_objects) {
memset(&gp_arg, 0, sizeof(gp_arg));
}
if (vws->ioctl.have_drm_2_15) {
+ 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,
+ &gp_arg, sizeof(gp_arg));
+ if (ret == 0 && gp_arg.value != 0) {
+ vws->base.have_intra_surface_copy = TRUE;
+ }
+
memset(&gp_arg, 0, sizeof(gp_arg));
gp_arg.param = DRM_VMW_PARAM_SM4_1;
ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GET_PARAM,