All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH 3/4] tests/intel/xe_oa: Enable capture just prior to reading OA data
Date: Mon, 20 Jul 2026 13:22:09 -0700	[thread overview]
Message-ID: <87fr1dxvgu.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20260717210027.2008255-9-umesh.nerlige.ramappa@intel.com>

On Fri, 17 Jul 2026 14:00:31 -0700, Umesh Nerlige Ramappa wrote:
>
> When running the test in a loop, sometimes the buffer overflow error was
> seen with smaller buffer sizes.
> To make the non-zero-reason test more robust, enable capture just before
> reading the data and surround the read with the load helper calls.

Hmm, not sure why this patch should make a difference... Anyway, since you
seem to be saying it does, and because it is mostly equivalent to previous
code, this is:

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> ---
>  tests/intel/xe_oa.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 98f00d377a86..4f652b187bae 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -2678,6 +2678,7 @@ test_non_zero_reason(const struct drm_xe_oa_unit *oau, size_t oa_buffer_size)
>		DRM_XE_OA_PROPERTY_OA_METRIC_SET, test_set->perf_oa_metrics_set,
>		DRM_XE_OA_PROPERTY_OA_FORMAT, __ff(fmt),
>		DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT, oa_exponent,
> +		DRM_XE_OA_PROPERTY_OA_DISABLED, true,
>		DRM_XE_OA_PROPERTY_OA_BUFFER_SIZE, oa_buffer_size ?: buffer_fill_size
>	};
>	struct intel_xe_oa_open_prop param = {
> @@ -2705,16 +2706,16 @@ test_non_zero_reason(const struct drm_xe_oa_unit *oau, size_t oa_buffer_size)
>	igt_assert(buf);
>
>	igt_debug("Ready to read about %u bytes\n", buf_size);
> -
> -	load_helper_init();
> -	load_helper_run(HIGH);
> -
>	if (!oa_buffer_size)
>		param.num_properties = param.num_properties - 1;
>
>	stream_fd = __perf_open(drm_fd, &param, true /* prevent_pm */);
>          set_fd_flags(stream_fd, O_CLOEXEC);
>
> +	load_helper_init();
> +	load_helper_run(HIGH);
> +
> +	do_ioctl(stream_fd, DRM_XE_OBSERVATION_IOCTL_ENABLE, 0);
>	while (total_len < buf_size &&
>	       ((len = read(stream_fd, &buf[total_len], buf_size - total_len)) > 0 ||
>		(len == -1 && (errno == EINTR || errno == EIO)))) {
> --
> 2.51.0
>

  reply	other threads:[~2026-07-20 20:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 21:00 [PATCH 0/4] Update some OA tests Umesh Nerlige Ramappa
2026-07-17 21:00 ` [PATCH 1/4] tests/intel/xe_oa: Allow disabling load helper from command line Umesh Nerlige Ramappa
2026-07-20 19:37   ` Dixit, Ashutosh
2026-07-17 21:00 ` [PATCH 2/4] tests/intel/xe_oa: Do not assume OA buffer is prefilled with zeroes Umesh Nerlige Ramappa
2026-07-20 19:42   ` Dixit, Ashutosh
2026-07-21 17:19     ` Umesh Nerlige Ramappa
2026-07-17 21:00 ` [PATCH 3/4] tests/intel/xe_oa: Enable capture just prior to reading OA data Umesh Nerlige Ramappa
2026-07-20 20:22   ` Dixit, Ashutosh [this message]
2026-07-17 21:00 ` [PATCH 4/4] tests/intel/xe_oa: Cleanup blocking and polling tests Umesh Nerlige Ramappa
2026-07-20 21:08   ` Dixit, Ashutosh
2026-07-21 17:26     ` Umesh Nerlige Ramappa
2026-07-17 22:49 ` ✓ Xe.CI.BAT: success for Update some OA tests Patchwork
2026-07-17 23:08 ` ✓ i915.CI.BAT: " Patchwork
2026-07-18  5:41 ` ✓ Xe.CI.FULL: " Patchwork
2026-07-18 14:11 ` ✗ i915.CI.Full: failure " 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=87fr1dxvgu.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=umesh.nerlige.ramappa@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 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.