[igt-dev] [PATCH i-g-t 02/20] lib/xe/xe_query: Add xe_gts interface

Ashutosh Dixit ashutosh.dixit at intel.com
Tue Aug 8 00:59:59 UTC 2023


Add support to get XE gt info from xe_device.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
 lib/xe/xe_query.c | 8 ++++++++
 lib/xe/xe_query.h | 1 +
 2 files changed, 9 insertions(+)

diff --git a/lib/xe/xe_query.c b/lib/xe/xe_query.c
index 8963c7b06b6b..01db3aef79f9 100644
--- a/lib/xe/xe_query.c
+++ b/lib/xe/xe_query.c
@@ -576,6 +576,14 @@ uint32_t xe_min_page_size(int fd, uint64_t region)
  */
 xe_dev_FN(xe_config, config, struct drm_xe_query_config *);
 
+/**
+ * xe_gts:
+ * @fd: xe device fd
+ *
+ * Returns query gts of xe device @fd.
+ */
+xe_dev_FN(xe_gts, gts, struct drm_xe_query_gts *);
+
 /**
  * xe_number_hw_engine:
  * @fd: xe device fd
diff --git a/lib/xe/xe_query.h b/lib/xe/xe_query.h
index 1b74c58ab823..e524f240c9d0 100644
--- a/lib/xe/xe_query.h
+++ b/lib/xe/xe_query.h
@@ -93,6 +93,7 @@ const char *xe_region_name(uint64_t region);
 uint16_t xe_region_class(int fd, uint64_t region);
 uint32_t xe_min_page_size(int fd, uint64_t region);
 struct drm_xe_query_config *xe_config(int fd);
+struct drm_xe_query_gts *xe_gts(int fd);
 unsigned int xe_number_hw_engines(int fd);
 bool xe_has_vram(int fd);
 uint64_t xe_vram_size(int fd, int gt);
-- 
2.41.0



More information about the igt-dev mailing list