[igt-dev] [V3 i-g-t 03/23] lib/xe/xe_query: Add xe_config() interface

Bhanuprakash Modem bhanuprakash.modem at intel.com
Thu Jun 22 06:54:02 UTC 2023


Add support to get XE configuration from xe_device.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.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 47be8f301..48fb5afba 100644
--- a/lib/xe/xe_query.c
+++ b/lib/xe/xe_query.c
@@ -479,6 +479,14 @@ uint32_t xe_min_page_size(int fd, uint64_t region)
 	return xe_mem_region(fd, region)->min_page_size;
 }
 
+/**
+ * xe_config:
+ * @fd: xe device fd
+ *
+ * Returns xe configuration of xe device @fd.
+ */
+xe_dev_FN(xe_config, config, struct drm_xe_query_config *);
+
 /**
  * xe_number_hw_engine:
  * @fd: xe device fd
diff --git a/lib/xe/xe_query.h b/lib/xe/xe_query.h
index 943ca558a..3cbf32668 100644
--- a/lib/xe/xe_query.h
+++ b/lib/xe/xe_query.h
@@ -86,6 +86,7 @@ struct drm_xe_engine_class_instance *xe_hw_engine(int fd, int idx);
 struct drm_xe_query_mem_region *xe_mem_region(int fd, uint64_t region);
 const char *xe_region_name(uint64_t region);
 uint32_t xe_min_page_size(int fd, uint64_t region);
+struct drm_xe_query_config *xe_config(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.40.0



More information about the igt-dev mailing list