From: Harish Chegondi <harish.chegondi@intel.com>
To: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: <igt-dev@lists.freedesktop.org>,
Ashutosh Dixit <ashutosh.dixit@intel.com>,
Adam Miszczak <adam.miszczak@linux.intel.com>,
Lukasz Laguna <lukasz.laguna@intel.com>,
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Subject: Re: [PATCH i-g-t] tests/intel/xe_eu_stall: Skip test if feature is not supported
Date: Tue, 3 Jun 2025 23:03:29 -0700 [thread overview]
Message-ID: <aD_hsTG_n_tqpx5V@intel.com> (raw)
In-Reply-To: <20250603160718.1744538-1-jakub1.kolakowski@intel.com>
On Tue, Jun 03, 2025 at 04:07:18PM +0000, Jakub Kolakowski wrote:
Hi Jakub,
Thanks for sending this patch. Recently I have been working on a
different but related issue:
https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5131
I have come up with a similar patch with the difference that I have used
a EU stall query IOCTL to check for EU stall support. The query IOCTL is
already being used in the test so I reused the query IOCTL to check for
EU stall support too. I copied you and others on that patch. Can you
please let me know your comments.
> Add a helper to check for feature support. If feature isn't supported
> skip the test.
>
> Cc: Harish Chegondi <harish.chegondi@intel.com>
> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
> Cc: Lukasz Laguna <lukasz.laguna@intel.com>
> Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
> Signed-off-by: Jakub Kolakowski <jakub1.kolakowski@intel.com>
> ---
> tests/intel/xe_eu_stall.c | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/tests/intel/xe_eu_stall.c b/tests/intel/xe_eu_stall.c
> index 411c30871..f3d7c1974 100644
> --- a/tests/intel/xe_eu_stall.c
> +++ b/tests/intel/xe_eu_stall.c
> @@ -267,6 +267,31 @@ static void xe_eu_stall_ioctl_err(int fd, enum drm_xe_observation_op op, void *a
> errno = 0;
> }
>
> +static bool is_eu_stall_supported(int drm_fd)
> +{
> + int stream_fd;
> + uint64_t properties[] = {
> + DRM_XE_EU_STALL_PROP_GT_ID, p_gt_id,
> + DRM_XE_EU_STALL_PROP_SAMPLE_RATE, DEFAULT_SAMPLE_RATE,
> + DRM_XE_EU_STALL_PROP_WAIT_NUM_REPORTS, p_num_reports,
> + };
> +
> + struct xe_eu_stall_open_prop props = {
> + .num_properties = ARRAY_SIZE(properties) / 2,
> + .properties_ptr = to_user_pointer(properties),
> + };
> +
> + stream_fd = xe_eu_stall_ioctl(drm_fd, DRM_XE_OBSERVATION_OP_STREAM_OPEN, &props);
> +
> + if(stream_fd == -1 && errno == ENODEV) {
> + close(stream_fd);
> + return false;
> + }
> +
> + close(stream_fd);
> + return true;
> +}
> +
> static uint64_t read_u64_file(const char *path)
> {
> FILE *f;
> @@ -654,6 +679,7 @@ igt_main_args("e:g:o:r:u:w:", long_options, help_str, opt_handler, NULL)
> igt_require_fd(drm_fd);
> devid = intel_get_drm_devid(drm_fd);
> igt_require(IS_PONTEVECCHIO(devid) || intel_graphics_ver(devid) >= IP_VER(20, 0));
This check would no longer be needed.
> + igt_require_f(is_eu_stall_supported(drm_fd), "EU stall sampling not supported\n");
> igt_require_f(igt_get_gpgpu_fillfunc(devid), "no gpgpu-fill function\n");
> igt_require_f(!stat(OBSERVATION_PARANOID, &sb), "no observation_paranoid file\n");
> if (output_file) {
> --
> 2.34.1
>
Thank You
Harish.
next prev parent reply other threads:[~2025-06-04 6:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 16:07 [PATCH i-g-t] tests/intel/xe_eu_stall: Skip test if feature is not supported Jakub Kolakowski
2025-06-03 19:33 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-06-03 19:50 ` ✗ i915.CI.BAT: failure " Patchwork
2025-06-04 6:03 ` Harish Chegondi [this message]
2025-06-04 18:03 ` ✗ 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=aD_hsTG_n_tqpx5V@intel.com \
--to=harish.chegondi@intel.com \
--cc=adam.miszczak@linux.intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jakub1.kolakowski@intel.com \
--cc=lukasz.laguna@intel.com \
--cc=marcin.bernatowicz@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox