summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFrancois Dugast <francois.dugast@intel.com>2023-12-15 18:45:42 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:47:00 +0300
commitff6c6bc55258e7d0aabcfc41baa392fcedb450a2 (patch)
tree4a68834c71bf5c27c56b433fb2650e6d7d39ff31 /include
parent4efaadd38bc4c6c1016996669002994061990633 (diff)
downloadlinux-ff6c6bc55258e7d0aabcfc41baa392fcedb450a2.tar.xz
drm/xe/uapi: Document use of size in drm_xe_device_query
Document the behavior of the driver for IOCTL DRM_IOCTL_XE_DEVICE_QUERY depending on the size value provided in struct drm_xe_device_query. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by: José Roberto de Souza <jose.souza@intel.com> Acked-by: Mateusz Naklicki <mateusz.naklicki@intel.com> Signed-off-by: Francois Dugast <francois.dugast@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/drm/xe_drm.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index d7893ccbbf8c..d759e04e00ee 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -467,9 +467,15 @@ struct drm_xe_query_topology_mask {
* struct drm_xe_device_query - Input of &DRM_IOCTL_XE_DEVICE_QUERY - main
* structure to query device information
*
- * If size is set to 0, the driver fills it with the required size for the
- * requested type of data to query. If size is equal to the required size,
- * the queried information is copied into data.
+ * The user selects the type of data to query among DRM_XE_DEVICE_QUERY_*
+ * and sets the value in the query member. This determines the type of
+ * the structure provided by the driver in data, among struct drm_xe_query_*.
+ *
+ * If size is set to 0, the driver fills it with the required size for
+ * the requested type of data to query. If size is equal to the required
+ * size, the queried information is copied into data. If size is set to
+ * a value different from 0 and different from the required size, the
+ * IOCTL call returns -EINVAL.
*
* For example the following code snippet allows retrieving and printing
* information about the device engines with DRM_XE_DEVICE_QUERY_ENGINES: