Skip to content

Commit

Permalink
drm/vmwgfx: Add SM5 param for userspace
Browse files Browse the repository at this point in the history
Add a new param for user-space to determine if kernel module is SM5
capable.

Signed-off-by: Deepak Rawat <drawat.floss@gmail.com>
Reviewed-by: Thomas Hellström (VMware) <thomas_os@shipmail.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Roland Scheidegger <sroland@vmware.com>
  • Loading branch information
Deepak Rawat authored and Roland Scheidegger committed Mar 23, 2020
1 parent 2a50f06 commit f0fce23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ int vmw_getparam_ioctl(struct drm_device *dev, void *data,
case DRM_VMW_PARAM_SM4_1:
param->value = has_sm4_1_context(dev_priv);
break;
case DRM_VMW_PARAM_SM5:
param->value = has_sm5_context(dev_priv);
break;
default:
return -EINVAL;
}
Expand Down
4 changes: 4 additions & 0 deletions include/uapi/drm/vmwgfx_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ extern "C" {
*
* DRM_VMW_PARAM_SM4_1
* SM4_1 support is enabled.
*
* DRM_VMW_PARAM_SM5
* SM5 support is enabled.
*/

#define DRM_VMW_PARAM_NUM_STREAMS 0
Expand All @@ -103,6 +106,7 @@ extern "C" {
#define DRM_VMW_PARAM_DX 12
#define DRM_VMW_PARAM_HW_CAPS2 13
#define DRM_VMW_PARAM_SM4_1 14
#define DRM_VMW_PARAM_SM5 15

/**
* enum drm_vmw_handle_type - handle type for ref ioctls
Expand Down

0 comments on commit f0fce23

Please sign in to comment.