From: Jan Maslak <jan.maslak@intel.com>
To: Dominik Grzegorzek <dominik.grzegorzek@intel.com>,
<igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] xe_eudebug_online: Add default threads_per_eu value for platforms without hwconfig.
Date: Fri, 13 Dec 2024 11:49:37 +0000 [thread overview]
Message-ID: <Z1wfUQFgfnQVyMmy@ART-DEV-395> (raw)
In-Reply-To: <20241213092339.18038-1-dominik.grzegorzek@intel.com>
On Fri, Dec 13, 2024 at 10:23:39AM +0100, Dominik Grzegorzek wrote:
> 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>
LGTM,
Reviewed-by: Jan Maslak <jan.maslak@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
>
next prev parent reply other threads:[~2024-12-13 11:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z1wfUQFgfnQVyMmy@ART-DEV-395 \
--to=jan.maslak@intel.com \
--cc=dominik.grzegorzek@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.