[PATCH i-g-t 2/2] tests/intel/*_query: Add support for new hwconfig table entry

John.C.Harrison at Intel.com John.C.Harrison at Intel.com
Thu Aug 1 19:51:29 UTC 2024


From: John Harrison <John.C.Harrison at Intel.com>

A new enum value has been added to the hardware config table. So
update the tests accordingly.

Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
---
 lib/intel_hwconfig_types.h | 1 +
 tests/intel/i915_query.c   | 1 +
 tests/intel/xe_query.c     | 3 ++-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/intel_hwconfig_types.h b/lib/intel_hwconfig_types.h
index d5db217afba2..0e6ce5b17084 100644
--- a/lib/intel_hwconfig_types.h
+++ b/lib/intel_hwconfig_types.h
@@ -96,6 +96,7 @@ enum intel_hwconfig {
 	INTEL_HWCONFIG_MAX_TASK_URB_ENTRIES,			/* 78 */
 	INTEL_HWCONFIG_MIN_MESH_URB_ENTRIES,			/* 79 */
 	INTEL_HWCONFIG_MAX_MESH_URB_ENTRIES,			/* 80 */
+	INTEL_HWCONFIG_MAX_GSC,					/* 81 */
 	__INTEL_HWCONFIG_KEY_LIMIT
 };
 
diff --git a/tests/intel/i915_query.c b/tests/intel/i915_query.c
index 4d706d62b286..54dbb193a50e 100644
--- a/tests/intel/i915_query.c
+++ b/tests/intel/i915_query.c
@@ -1339,6 +1339,7 @@ static const char * const hwconfig_keys[] = {
 	[INTEL_HWCONFIG_MAX_TASK_URB_ENTRIES] = "Max Task URB Entries",
 	[INTEL_HWCONFIG_MIN_MESH_URB_ENTRIES] = "Min Mesh URB Entries",
 	[INTEL_HWCONFIG_MAX_MESH_URB_ENTRIES] = "Max Mesh URB Entries",
+	[INTEL_HWCONFIG_MAX_GSC] = "MaxGSC",
 };
 
 static const char * const hwconfig_memtypes[] = {
diff --git a/tests/intel/xe_query.c b/tests/intel/xe_query.c
index 6ebf5e4b6d71..ddb2e76e5dd6 100644
--- a/tests/intel/xe_query.c
+++ b/tests/intel/xe_query.c
@@ -50,7 +50,7 @@ void dump_hex_debug(void *buffer, int len)
 /* Please reflect intel_hwconfig_types.h changes below
  * static_asserti_value + get_hwconfig_name
  *   Thanks :-) */
-static_assert(INTEL_HWCONFIG_MAX_MESH_URB_ENTRIES+1 == __INTEL_HWCONFIG_KEY_LIMIT, "");
+static_assert(INTEL_HWCONFIG_MAX_GSC + 1 == __INTEL_HWCONFIG_KEY_LIMIT, "");
 
 #define CASE_STRINGIFY(A) case INTEL_HWCONFIG_##A: return #A;
 const char* get_hwconfig_name(int param)
@@ -136,6 +136,7 @@ const char* get_hwconfig_name(int param)
 	CASE_STRINGIFY(MAX_TASK_URB_ENTRIES);
 	CASE_STRINGIFY(MIN_MESH_URB_ENTRIES);
 	CASE_STRINGIFY(MAX_MESH_URB_ENTRIES);
+	CASE_STRINGIFY(MAX_GSC);
 	}
 	igt_assert_lt(param, __INTEL_HWCONFIG_KEY_LIMIT);
 	igt_assert(!"Missing config table enum");
-- 
2.45.2



More information about the igt-dev mailing list