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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -467,9 +467,15 @@ struct drm_xe_query_topology_mask { · 466 unmodified lines | |||
| 467 | * struct drm_xe_device_query - Input of &DRM_IOCTL_XE_DEVICE_QUERY - main | 467 | * struct drm_xe_device_query - Input of &DRM_IOCTL_XE_DEVICE_QUERY - main |
| 468 | * structure to query device information | 468 | * structure to query device information |
| 469 | * | 469 | * |
| 470 | * If size is set to 0, the driver fills it with the required size for the | 470 | * The user selects the type of data to query among DRM_XE_DEVICE_QUERY_* |
| 471 | * requested type of data to query. If size is equal to the required size, | 471 | * and sets the value in the query member. This determines the type of |
| 472 | * the queried information is copied into data. | 472 | * the structure provided by the driver in data, among struct drm_xe_query_*. |
| 473 | * | ||
| 474 | * If size is set to 0, the driver fills it with the required size for | ||
| 475 | * the requested type of data to query. If size is equal to the required | ||
| 476 | * size, the queried information is copied into data. If size is set to | ||
| 477 | * a value different from 0 and different from the required size, the | ||
| 478 | * IOCTL call returns -EINVAL. | ||
| 473 | * | 479 | * |
| 474 | * For example the following code snippet allows retrieving and printing | 480 | * For example the following code snippet allows retrieving and printing |
| 475 | * information about the device engines with DRM_XE_DEVICE_QUERY_ENGINES: | 481 | * information about the device engines with DRM_XE_DEVICE_QUERY_ENGINES: |