Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] xe_eudebug_online: Add default threads_per_eu value for platforms without hwconfig.
@ 2024-12-13  9:23 Dominik Grzegorzek
  2024-12-13 11:49 ` Jan Maslak
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dominik Grzegorzek @ 2024-12-13  9:23 UTC (permalink / raw)
  To: igt-dev; +Cc: jan.maslak, Dominik Grzegorzek

There are hardware platforms which are not supporting
hwconfig table, for example ADLS. Since [1] queried number of threads per eu
can be NULL, accept it and use 8 as default.

Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>

[1] https://patchwork.freedesktop.org/series/142282/

---
 tests/intel/xe_eudebug_online.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index bf53b44ce..8fdd071a5 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -1155,7 +1155,7 @@ static int query_attention_bitmask_size(int fd, int gt)
 {
 	uint32_t thread_count_len;
 	uint32_t *thread_count_ptr;
-	uint32_t thread_count;
+	uint32_t threads_per_eu = 8;
 	struct drm_xe_query_topology_mask *c_dss = NULL, *g_dss = NULL, *eu_per_dss = NULL;
 	struct drm_xe_query_topology_mask *topology;
 	struct drm_xe_device_query query = {
@@ -1169,9 +1169,10 @@ static int query_attention_bitmask_size(int fd, int gt)
 
 	thread_count_ptr = xe_hwconfig_lookup_value(fd, INTEL_HWCONFIG_NUM_THREADS_PER_EU,
 						    &thread_count_len);
-	igt_assert(thread_count_ptr);
-	igt_assert(thread_count_len == 1);
-	thread_count = *thread_count_ptr;
+	if (thread_count_ptr) {
+		igt_assert(thread_count_len == 1);
+		threads_per_eu = *thread_count_ptr;
+	}
 
 	igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), 0);
 	igt_assert_neq(query.size, 0);
@@ -1222,7 +1223,7 @@ static int query_attention_bitmask_size(int fd, int gt)
 	free(any_dss);
 	free(topology);
 
-	return eus * DIV_ROUND_UP(thread_count, 8);
+	return eus * DIV_ROUND_UP(threads_per_eu, 8);
 }
 
 static struct drm_xe_eudebug_event_exec_queue *
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-14  0:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13  9:23 [PATCH i-g-t] xe_eudebug_online: Add default threads_per_eu value for platforms without hwconfig Dominik Grzegorzek
2024-12-13 11:49 ` Jan Maslak
2024-12-13 14:32 ` ✓ Xe.CI.BAT: success for " Patchwork
2024-12-13 14:33 ` ✗ i915.CI.BAT: failure " Patchwork
2024-12-14  0:25 ` ✗ Xe.CI.Full: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox