[PATCH 2/2] tests/xe_eudebug_online: update thread count handling in query_attention_bitmask_size()
Maslak, Jan
jan.maslak at intel.com
Thu Nov 14 16:28:43 UTC 2024
---
tests/intel/xe_eudebug_online.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index 0ef0d8093..514c59f8a 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -1118,7 +1118,9 @@ static bool intel_gen_has_lockstep_eus(int fd)
static int query_attention_bitmask_size(int fd, int gt)
{
- const unsigned int threads = 8;
+ uint32_t thread_count_len;
+ uint32_t* thread_count_ptr;
+ uint32_t thread_count;
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 = {
@@ -1130,6 +1132,10 @@ static int query_attention_bitmask_size(int fd, int gt)
int pos = 0, eus;
uint8_t *any_dss;
+ thread_count_ptr = xe_hwconfig_lookup_value(fd, INTEL_HWCONFIG_NUM_THREADS_PER_EU, &thread_count_len);
+ igt_assert(thread_count_ptr);
+ thread_count = *thread_count_ptr;
+
igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), 0);
igt_assert_neq(query.size, 0);
@@ -1178,8 +1184,9 @@ static int query_attention_bitmask_size(int fd, int gt)
free(any_dss);
free(topology);
+ free(thread_count_ptr);
- return eus * threads / 8;
+ return eus * DIV_ROUND_UP(thread_count, 8);
}
static struct drm_xe_eudebug_event_exec_queue *
--
2.34.1
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
More information about the igt-dev
mailing list