Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Shekhar Chauhan <shekhar.chauhan@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH v6 2/2] tests/intel/xe_oa: Wa_14026633728
Date: Thu, 07 May 2026 08:11:19 -0700	[thread overview]
Message-ID: <87bjergsq0.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20260507053459.766300-3-shekhar.chauhan@intel.com>

On Wed, 06 May 2026 22:34:59 -0700, Shekhar Chauhan wrote:
>
> For MERTOA in CRI, oa buffer can be in device memory. Because of slower
> device mem access, OA exponent values lower than 8 can result in buffer
> overflows. Bump the OA exponent value.
>
> Signed-off-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
> ---
>  tests/intel/xe_oa.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 988c46df6..c464d5a0d 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -24,6 +24,7 @@
>  #include "igt_device.h"
>  #include "igt_syncobj.h"
>  #include "igt_sysfs.h"
> +#include "intel_wa.h"
>  #include "xe/xe_ioctl.h"
>  #include "xe/xe_query.h"
>  #include "xe/xe_oa.h"
> @@ -2648,6 +2649,11 @@ test_non_zero_reason(const struct drm_xe_oa_unit *oau, size_t oa_buffer_size)
>	struct intel_xe_perf_metric_set *test_set = oa_unit_metric_set(oau);
>	uint64_t fmt = test_set->perf_oa_format;
>	size_t report_size = get_oa_format(fmt).size;
> +	/*
> +	 * If modifying the indices or order of items inside properties[],
> +	 * ensure that a corresponding change is made for oa_exponent index
> +	 * in the workaround Wa_14026633728 below as well.
> +	 */

Delete this comment, this is not the only place where this is done in this
file and the function is small enough for someone to check this automatically.

>	uint64_t properties[] = {
>		DRM_XE_OA_PROPERTY_OA_UNIT_ID, oau->oa_unit_id,
>
> @@ -2671,6 +2677,18 @@ test_non_zero_reason(const struct drm_xe_oa_unit *oau, size_t oa_buffer_size)
>	int len, check_idx;
>	u32 oa_status;
>
> +	/*
> +	 * Wa_14026633728: For MERTOA in CRI, oa buffer can be in device memory.
> +	 * Because of slower device mem access, OA exponent values lower than 8
> +	 * can result in buffer overflows. Also, update the value of oa_exponent
> +	 * in properties[].
> +	 */
> +	if (oau->oa_unit_type == DRM_XE_OA_UNIT_TYPE_MERT &&
> +        igt_has_intel_wa(drm_fd, "14026633728")) {
> +        oa_exponent = max(oa_exponent, 8);
> +        properties[9] = oa_exponent;
> +    }

Hmm, code should use tabs, not spaces. Please fix your editor to do this.

> +
>	igt_assert(buf);
>
>	igt_debug("Ready to read about %u bytes\n", buf_size);
> --
> 2.53.0
>

  parent reply	other threads:[~2026-05-07 15:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  5:34 [PATCH v6 0/2] Wa_14026633728 Shekhar Chauhan
2026-05-07  5:34 ` [PATCH v6 1/2] lib/intel_wa: Check for device workarounds Shekhar Chauhan
2026-05-07  5:34 ` [PATCH v6 2/2] tests/intel/xe_oa: Wa_14026633728 Shekhar Chauhan
2026-05-07  5:50   ` Shekhar Chauhan
2026-05-07 15:11   ` Dixit, Ashutosh [this message]
2026-05-08  2:23     ` Shekhar Chauhan
2026-05-07  7:16 ` ✓ Xe.CI.BAT: success for Wa_14026633728 (rev3) Patchwork
2026-05-07  7:19 ` ✓ i915.CI.BAT: " Patchwork
2026-05-07 16:52 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-07 17:16 ` ✗ i915.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=87bjergsq0.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=shekhar.chauhan@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