From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [PATCH 2/5] drm/xe/oa: Print hwe to OA unit mapping
Date: Fri, 6 Jun 2025 12:26:14 -0700 [thread overview]
Message-ID: <20250606192618.4133817-3-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20250606192618.4133817-1-ashutosh.dixit@intel.com>
Print hwe to OA unit mapping to dmesg, to help debug for current and new
platforms.
v2: Separate out xe_oa_print_gt_oa_units() (Umesh)
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
drivers/gpu/drm/xe/xe_oa.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
index 0de0d5a18df74..e22405166db6b 100644
--- a/drivers/gpu/drm/xe/xe_oa.c
+++ b/drivers/gpu/drm/xe/xe_oa.c
@@ -2603,6 +2603,36 @@ static int xe_oa_init_gt(struct xe_gt *gt)
return 0;
}
+static void xe_oa_print_gt_oa_units(struct xe_gt *gt)
+{
+ enum xe_hw_engine_id hwe_id;
+ struct xe_hw_engine *hwe;
+ struct xe_oa_unit *u;
+ char buf[256];
+ int i, n;
+
+ for (i = 0; i < gt->oa.num_oa_units; i++) {
+ u = >->oa.oa_unit[i];
+ buf[0] = '\0';
+ n = 0;
+
+ for_each_hw_engine(hwe, gt, hwe_id)
+ if (xe_oa_unit_id(hwe) == u->oa_unit_id)
+ n += scnprintf(buf + n, sizeof(buf) - n, "%s ", hwe->name);
+
+ xe_gt_dbg(gt, "oa_unit %d, type %d, Engines: %s\n", u->oa_unit_id, u->type, buf);
+ }
+}
+
+static void xe_oa_print_oa_units(struct xe_oa *oa)
+{
+ struct xe_gt *gt;
+ int gt_id;
+
+ for_each_gt(gt, oa->xe, gt_id)
+ xe_oa_print_gt_oa_units(gt);
+}
+
static int xe_oa_init_oa_units(struct xe_oa *oa)
{
struct xe_gt *gt;
@@ -2619,6 +2649,8 @@ static int xe_oa_init_oa_units(struct xe_oa *oa)
return ret;
}
+ xe_oa_print_oa_units(oa);
+
return 0;
}
--
2.48.1
next prev parent reply other threads:[~2025-06-06 19:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 19:26 [PATCH 0/5] Enable media OA Ashutosh Dixit
2025-06-06 19:26 ` [PATCH 1/5] drm/xe/oa/uapi: Expose media OA units Ashutosh Dixit
2025-06-06 19:26 ` Ashutosh Dixit [this message]
2025-06-06 19:26 ` [PATCH 3/5] drm/xe/oa: Introduce stream->oa_unit Ashutosh Dixit
2025-06-06 19:26 ` [PATCH 4/5] drm/xe/oa: Assign hwe for OAM_SAG Ashutosh Dixit
2025-06-06 19:26 ` [PATCH 5/5] drm/xe/oa: Enable OAM latency measurement Ashutosh Dixit
2025-06-06 19:31 ` ✓ CI.Patch_applied: success for Enable media OA Patchwork
2025-06-06 19:31 ` ✓ CI.checkpatch: " Patchwork
2025-06-06 19:33 ` ✓ CI.KUnit: " Patchwork
2025-06-06 19:43 ` ✓ CI.Build: " Patchwork
2025-06-06 19:46 ` ✓ CI.Hooks: " Patchwork
2025-06-06 19:48 ` ✓ CI.checksparse: " Patchwork
2025-06-06 20:23 ` ✓ Xe.CI.BAT: " Patchwork
2025-06-09 3:26 ` ✓ Xe.CI.Full: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2025-06-06 16:02 [PATCH v4 0/5] " Ashutosh Dixit
2025-06-06 16:02 ` [PATCH 2/5] drm/xe/oa: Print hwe to OA unit mapping Ashutosh Dixit
2025-06-03 20:21 [PATCH v3 0/5] Enable media OA Ashutosh Dixit
2025-06-03 20:21 ` [PATCH 2/5] drm/xe/oa: Print hwe to OA unit mapping Ashutosh Dixit
2025-06-04 23:49 ` Umesh Nerlige Ramappa
2025-06-06 16:05 ` Dixit, Ashutosh
2025-05-31 0:12 [PATCH v2 0/5] Enable media OA Ashutosh Dixit
2025-05-31 0:12 ` [PATCH 2/5] drm/xe/oa: Print hwe to OA unit mapping 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=20250606192618.4133817-3-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=intel-xe@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