Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] tests/intel/xe_oa: Wa_14026633728
@ 2026-04-30  5:08 Shekhar Chauhan
  2026-04-30  6:05 ` ✓ i915.CI.BAT: success for tests/intel/xe_oa: Wa_14026633728 (rev3) Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Shekhar Chauhan @ 2026-04-30  5:08 UTC (permalink / raw)
  To: igt-dev; +Cc: shekhar.chauhan, ashutosh.dixit, gustavo.sousa

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.

v2: Fix commit title, description and code description.
v3: Check if the wa exists and reuse it, also, fix a warning for C90
rule about using variables before all declaration statements are
executed.

Signed-off-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
---
 tests/intel/xe_oa.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index 988c46df6..c7e756426 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"
@@ -2643,8 +2644,15 @@ test_buffer_fill(const struct drm_xe_oa_unit *oau)
 static void
 test_non_zero_reason(const struct drm_xe_oa_unit *oau, size_t oa_buffer_size)
 {
-	/* ~20 micro second period */
-	int oa_exponent = max_oa_exponent_for_period_lte(20000);
+	/*
+	 * 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.
+	 * By default, use ~20 micro second period.
+	 */
+	int oa_exponent = max(max_oa_exponent_for_period_lte(20000),
+			      (oau->oa_unit_type == DRM_XE_OA_UNIT_TYPE_MERT &&
+			       igt_has_intel_wa(drm_fd, "14026633728") > 0) ? 8 : 0);
 	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;
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-30 16:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30  5:08 [PATCH v3] tests/intel/xe_oa: Wa_14026633728 Shekhar Chauhan
2026-04-30  6:05 ` ✓ i915.CI.BAT: success for tests/intel/xe_oa: Wa_14026633728 (rev3) Patchwork
2026-04-30  6:21 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-30  6:40 ` [PATCH v3] tests/intel/xe_oa: Wa_14026633728 Dixit, Ashutosh
2026-04-30 12:27 ` ✓ i915.CI.Full: success for tests/intel/xe_oa: Wa_14026633728 (rev3) Patchwork
2026-04-30 16:42 ` ✗ Xe.CI.FULL: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox