Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Subject: [PATCH i-g-t 2/6] tests/intel/xe_oa: Fix oa_tick_delta
Date: Tue,  8 Apr 2025 11:12:06 -0700	[thread overview]
Message-ID: <20250408181210.1052760-3-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20250408181210.1052760-1-ashutosh.dixit@intel.com>

oa_tick_delta should take into account whether OA report header is 64 or 32
bit when passing width to elapsed_delta.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tests/intel/xe_oa.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index a20120881a..2440101900 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -627,8 +627,11 @@ oa_tick_delta(const uint32_t *report1,
 	      const uint32_t *report0,
 	      enum intel_xe_oa_format_name format)
 {
+	struct oa_format fmt = get_oa_format(format);
+	uint32_t width = fmt.report_hdr_64bit ? 64 : 32;
+
 	return elapsed_delta(read_report_ticks(report1, format),
-			     read_report_ticks(report0, format), 32);
+			     read_report_ticks(report0, format), width);
 }
 
 static void
-- 
2.48.1


  parent reply	other threads:[~2025-04-08 18:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08 18:12 [PATCH i-g-t 0/6] Sanity check Xe2 PEC OA reports Ashutosh Dixit
2025-04-08 18:12 ` [PATCH i-g-t 1/6] tests/intel/xe_oa: Rename check_reports to mmap_check_reports Ashutosh Dixit
2025-04-14 22:20   ` Umesh Nerlige Ramappa
2025-04-08 18:12 ` Ashutosh Dixit [this message]
2025-04-14 22:21   ` [PATCH i-g-t 2/6] tests/intel/xe_oa: Fix oa_tick_delta Umesh Nerlige Ramappa
2025-04-08 18:12 ` [PATCH i-g-t 3/6] tests/intel/xe_oa: Sanity check PEC report data for TestOa metric set Ashutosh Dixit
2025-04-14 23:16   ` Umesh Nerlige Ramappa
2025-04-15 16:57     ` Dixit, Ashutosh
2025-04-16 16:20       ` Umesh Nerlige Ramappa
2025-04-22 19:42         ` Dixit, Ashutosh
2025-04-08 18:12 ` [PATCH i-g-t 4/6] tests/intel/xe_oa: Only sanity check timer PEC reports Ashutosh Dixit
2025-04-14 22:36   ` Umesh Nerlige Ramappa
2025-04-08 18:12 ` [PATCH i-g-t 5/6] tests/intel/xe_oa: Reduce test_non_zero_reason execution time Ashutosh Dixit
2025-04-14 22:40   ` Umesh Nerlige Ramappa
2025-04-15 16:49     ` Dixit, Ashutosh
2025-04-08 18:12 ` [PATCH i-g-t 6/6] tests/intel/xe_oa: Use TestOa metric set also for OAM Ashutosh Dixit
2025-04-14 22:41   ` Umesh Nerlige Ramappa
2025-04-14 23:22     ` Dixit, Ashutosh
2025-04-08 19:58 ` ✓ i915.CI.BAT: success for Sanity check Xe2 PEC OA reports Patchwork
2025-04-08 20:04 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-08 21:04 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-08 21:42 ` ✗ i915.CI.Full: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-04-22 19:34 [PATCH i-g-t 0/6] " Ashutosh Dixit
2025-04-22 19:34 ` [PATCH i-g-t 2/6] tests/intel/xe_oa: Fix oa_tick_delta Ashutosh Dixit

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=20250408181210.1052760-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox