[igt-dev] [PATCH i-g-t] tests/i915_query: Add igt_debug() calls for geometry-subslices

Gustavo Sousa gustavo.sousa at intel.com
Tue Jun 13 21:01:32 UTC 2023


Besides providing extra debug information, this also allows one to
simply use the test binary to quickly check values.

Signed-off-by: Gustavo Sousa <gustavo.sousa at intel.com>
---
 tests/i915/i915_query.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/i915/i915_query.c b/tests/i915/i915_query.c
index 62f7de428ec8..194f2e91b0ad 100644
--- a/tests/i915/i915_query.c
+++ b/tests/i915/i915_query.c
@@ -1249,6 +1249,10 @@ static void test_query_geometry_subslices(int fd)
 		item.flags =  e->class | (e->instance << 16);
 		i915_query_items(fd, &item, 1);
 
+		igt_debug("%s is render engine: %s\n",
+			  e->name,
+			  e->class == I915_ENGINE_CLASS_RENDER ? "yes" : "no");
+
 		/* Non-render engines should return -EINVAL */
 		if (e->class != I915_ENGINE_CLASS_RENDER) {
 			igt_assert_eq(item.length, -EINVAL);
@@ -1262,6 +1266,14 @@ static void test_query_geometry_subslices(int fd)
 		item.data_ptr = to_user_pointer(topo_info);
 		i915_query_items(fd, &item, 1);
 
+		igt_debug("  max_slices=%hu max_subslices=%hu max_eus_per_subslice=%hu\n",
+			  topo_info->max_slices, topo_info->max_subslices,
+			  topo_info->max_eus_per_subslice);
+		igt_debug("  subslice_offset=%hu subslice_stride=%hu\n",
+			  topo_info->subslice_offset, topo_info->subslice_stride);
+		igt_debug("  eu_offset=%hu eu_stride=%hu\n",
+			  topo_info->eu_offset, topo_info->eu_stride);
+
 		igt_assert(topo_info->max_subslices > 0);
 		igt_assert(topo_info->max_eus_per_subslice > 0);
 
-- 
2.41.0



More information about the igt-dev mailing list