From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id DAE8A10E3E8 for ; Tue, 26 Sep 2023 13:01:25 +0000 (UTC) From: Francois Dugast To: igt-dev@lists.freedesktop.org Date: Tue, 26 Sep 2023 13:00:45 +0000 Message-Id: <20230926130054.6-16-francois.dugast@intel.com> In-Reply-To: <20230926130054.6-1-francois.dugast@intel.com> References: <20230926130054.6-1-francois.dugast@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH v3 15/24] drm-uapi/xe: Align with documentation updates List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rodrigo Vivi Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: From: Rodrigo Vivi Align with commit ("drm/xe/uapi: Add documentation for query") Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast --- include/drm-uapi/xe_drm.h | 41 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/include/drm-uapi/xe_drm.h b/include/drm-uapi/xe_drm.h index 02279b791..df0455450 100644 --- a/include/drm-uapi/xe_drm.h +++ b/include/drm-uapi/xe_drm.h @@ -324,14 +324,43 @@ struct drm_xe_query_config { /** @pad: MBZ */ __u32 pad; + /* + * Device ID (lower 16 bits) and the device revision (next + * 8 bits) + */ #define XE_QUERY_CONFIG_REV_AND_DEVICE_ID 0 + /* + * Flags describing the device configuration, see list below + */ #define XE_QUERY_CONFIG_FLAGS 1 + /* + * Flag is set if the device has usable VRAM + */ #define XE_QUERY_CONFIG_FLAGS_HAS_VRAM (0x1 << 0) + /* + * Minimal memory alignment required by this device, + * typically SZ_4K or SZ_64K + */ #define XE_QUERY_CONFIG_MIN_ALIGNMENT 2 + /* + * Maximum bits of a virtual address + */ #define XE_QUERY_CONFIG_VA_BITS 3 + /* + * Total number of GTs for the entire device + */ #define XE_QUERY_CONFIG_GT_COUNT 4 + /* + * Total number of accessible memory regions + */ #define XE_QUERY_CONFIG_MEM_REGION_COUNT 5 + /* + * Value of the highest available exec queue priority + */ #define XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY 6 + /* + * Number of elements in the info array + */ #define XE_QUERY_CONFIG_NUM_PARAM (XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY + 1) /** @info: array of elements containing the config info */ __u64 info[]; @@ -443,9 +472,15 @@ struct drm_xe_query_topology_mask { /** * struct drm_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: -- 2.34.1