aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorNeha Bhende <[email protected]>2017-03-06 15:50:20 -0800
committerBrian Paul <[email protected]>2018-09-05 11:22:42 -0600
commit4639ef37638e34d8225c6ec0a1de864d06bdf951 (patch)
treed016c4ab7fba4185ae4b509e7a6de69d71a42017 /src/gallium/winsys
parent6b3627da08997701b837dfb166eb0fb35a6312ee (diff)
svga/winsys: Add cap2 support in winsys
Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/svga/drm/vmw_screen_ioctl.c14
-rw-r--r--src/gallium/winsys/svga/drm/vmwgfx_drm.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
index 16dd5c8593a..f759f765e8b 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
@@ -928,6 +928,20 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws)
if (vws->base.have_gb_objects && !drm_gb_capable)
goto out_no_3d;
+ 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)
+ vws->base.have_intra_surface_copy = FALSE;
+ else {
+ if (gp_arg.value & (uint64_t) SVGA_CAP2_INTRA_SURFACE_COPY)
+ vws->base.have_intra_surface_copy = TRUE;
+ else
+ vws->base.have_intra_surface_copy = FALSE;
+ }
+
+
vws->base.have_vgpu10 = FALSE;
if (vws->base.have_gb_objects) {
memset(&gp_arg, 0, sizeof(gp_arg));
diff --git a/src/gallium/winsys/svga/drm/vmwgfx_drm.h b/src/gallium/winsys/svga/drm/vmwgfx_drm.h
index 13d779494fb..21696d02f2f 100644
--- a/src/gallium/winsys/svga/drm/vmwgfx_drm.h
+++ b/src/gallium/winsys/svga/drm/vmwgfx_drm.h
@@ -91,6 +91,7 @@
#define DRM_VMW_PARAM_MAX_MOB_SIZE 10
#define DRM_VMW_PARAM_SCREEN_TARGET 11
#define DRM_VMW_PARAM_VGPU10 12
+#define DRM_VMW_PARAM_HW_CAPS2 13
/**
* enum drm_vmw_handle_type - handle type for ref ioctls