From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Harish Chegondi <harish.chegondi@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 1/1] tests/intel/xe_eu_stall: Use default sampling rate from the query IOCTL data
Date: Fri, 27 Jun 2025 16:35:29 -0700 [thread overview]
Message-ID: <85wm8wkbb2.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <766c5f4f8604f752be1894aa9d17f9c16b84d4df.1751057370.git.harish.chegondi@intel.com>
On Fri, 27 Jun 2025 13:50:50 -0700, Harish Chegondi wrote:
>
> EU stall query IOCTL returns the supported sampling rates. If the user
> doesn't pass a sampling rate, use a mid sampling rate from those
> returned from the query IOCTL.
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
>
> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
> ---
> tests/intel/xe_eu_stall.c | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/tests/intel/xe_eu_stall.c b/tests/intel/xe_eu_stall.c
> index c496e654b..88202488c 100644
> --- a/tests/intel/xe_eu_stall.c
> +++ b/tests/intel/xe_eu_stall.c
> @@ -54,7 +54,6 @@
> #define MAX_XECORES 64
> #define NUM_ITERS_GPGPU_FILL 100
> #define DEFAULT_NUM_REPORTS 1
> -#define DEFAULT_SAMPLE_RATE (251 * 4)
> #define DEFAULT_USER_BUF_SIZE (64 * 512 * 1024)
>
> #define WIDTH 64
> @@ -346,17 +345,17 @@ static void test_invalid_arguments(int drm_fd, uint8_t gt_id, uint32_t rate, uin
>
> static void test_invalid_gt_id(int fd)
> {
> - test_invalid_arguments(fd, 255, DEFAULT_SAMPLE_RATE, DEFAULT_NUM_REPORTS);
> + test_invalid_arguments(fd, 255, p_rate, DEFAULT_NUM_REPORTS);
> }
>
> static void test_invalid_sampling_rate(int fd)
> {
> - test_invalid_arguments(fd, 0, 251 * 10, DEFAULT_NUM_REPORTS);
> + test_invalid_arguments(fd, 0, p_rate * 10, DEFAULT_NUM_REPORTS);
> }
>
> static void test_invalid_event_report_count(int fd)
> {
> - test_invalid_arguments(fd, 0, DEFAULT_SAMPLE_RATE,
> + test_invalid_arguments(fd, 0, p_rate,
> NUM_DATA_ROWS(512 * 1024) * MAX_XECORES + 1);
> }
>
> @@ -387,7 +386,7 @@ static void test_non_privileged_access(int drm_fd)
> igt_fork(child, 1) {
> 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_SAMPLE_RATE, p_rate,
> DRM_XE_EU_STALL_PROP_WAIT_NUM_REPORTS, p_num_reports,
> };
>
> @@ -409,7 +408,7 @@ static void test_non_privileged_access(int drm_fd)
> igt_fork(child, 1) {
> 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_SAMPLE_RATE, p_rate,
> DRM_XE_EU_STALL_PROP_WAIT_NUM_REPORTS, p_num_reports,
> };
>
> @@ -647,7 +646,7 @@ static struct option long_options[] = {
> igt_main_args("e:g:o:r:u:w:", long_options, help_str, opt_handler, NULL)
> {
> bool blocking_read = true;
> - int drm_fd, ret;
> + int drm_fd, ret, idx;
> uint32_t devid;
> struct stat sb;
> struct drm_xe_device_query query = {
> @@ -679,8 +678,11 @@ igt_main_args("e:g:o:r:u:w:", long_options, help_str, opt_handler, NULL)
> igt_assert_eq(igt_ioctl(drm_fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), 0);
>
> igt_assert(query_eu_stall_data->num_sampling_rates > 0);
> - if (p_rate == 0)
> - p_rate = query_eu_stall_data->sampling_rates[0];
> + /* If the user doesn't pass a sampling rate, use a mid sampling rate */
> + if (p_rate == 0) {
> + idx = query_eu_stall_data->num_sampling_rates / 2;
> + p_rate = query_eu_stall_data->sampling_rates[idx];
> + }
>
> if (output_file) {
> output = fopen(output_file, "w");
> --
> 2.48.1
>
next prev parent reply other threads:[~2025-06-27 23:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 20:50 [PATCH i-g-t 1/1] tests/intel/xe_eu_stall: Use default sampling rate from the query IOCTL data Harish Chegondi
2025-06-27 23:35 ` Dixit, Ashutosh [this message]
2025-06-30 22:23 ` ✓ Xe.CI.BAT: success for series starting with [i-g-t,1/1] " Patchwork
2025-06-30 22:31 ` ✓ i915.CI.BAT: " Patchwork
2025-07-01 18:01 ` ✗ i915.CI.Full: failure " Patchwork
2025-07-02 4:58 ` ✗ 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=85wm8wkbb2.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=harish.chegondi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox