Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/vmwgfx: Allow checking for gl43 contexts

To make sure we're running on top of hardware that can support
GL4.3 we need to add a way of querying for those capabilities.
DRM_VMW_PARAM_GL43 allows userspace to check for presence of
GL4.3 capable contexts.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211206172620.3139754-10-zack@kde.org

+4
+3
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
··· 105 105 case DRM_VMW_PARAM_SM5: 106 106 param->value = has_sm5_context(dev_priv); 107 107 break; 108 + case DRM_VMW_PARAM_GL43: 109 + param->value = has_gl43_context(dev_priv); 110 + break; 108 111 default: 109 112 return -EINVAL; 110 113 }
+1
include/uapi/drm/vmwgfx_drm.h
··· 110 110 #define DRM_VMW_PARAM_HW_CAPS2 13 111 111 #define DRM_VMW_PARAM_SM4_1 14 112 112 #define DRM_VMW_PARAM_SM5 15 113 + #define DRM_VMW_PARAM_GL43 16 113 114 114 115 /** 115 116 * enum drm_vmw_handle_type - handle type for ref ioctls