drm/vmwgfx: Allow checking for gl43 contexts
authorZack Rusin <zackr@vmware.com>
Mon, 6 Dec 2021 17:26:17 +0000 (12:26 -0500)
committerZack Rusin <zackr@vmware.com>
Thu, 9 Dec 2021 18:16:29 +0000 (13:16 -0500)
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
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
include/uapi/drm/vmwgfx_drm.h

index 28af34ab6ed611d8ec702bc7a690e2cbbd0f9071..471da2b4c1777b2459491ba9cbde336f49cfbc70 100644 (file)
@@ -105,6 +105,9 @@ int vmw_getparam_ioctl(struct drm_device *dev, void *data,
        case DRM_VMW_PARAM_SM5:
                param->value = has_sm5_context(dev_priv);
                break;
+       case DRM_VMW_PARAM_GL43:
+               param->value = has_gl43_context(dev_priv);
+               break;
        default:
                return -EINVAL;
        }
index 9078775feb51cefe43e7c2a0dba5ffee14079151..8277644c1144b48e89ae2722a1b22d5791a09441 100644 (file)
@@ -110,6 +110,7 @@ extern "C" {
 #define DRM_VMW_PARAM_HW_CAPS2         13
 #define DRM_VMW_PARAM_SM4_1            14
 #define DRM_VMW_PARAM_SM5              15
+#define DRM_VMW_PARAM_GL43             16
 
 /**
  * enum drm_vmw_handle_type - handle type for ref ioctls