diff options
| author | Ashutosh Dixit <ashutosh.dixit@intel.com> | 2025-06-06 12:26:14 -0700 |
|---|---|---|
| committer | Ashutosh Dixit <ashutosh.dixit@intel.com> | 2025-06-17 11:31:53 -0700 |
| commit | f3a3fd2c6f87f0e7d225019d7ed34c6bddf573f9 (patch) | |
| tree | adbfd2a9cd7e2aa8dfaa9bd9395ec80f56f6b9cc /drivers/gpu | |
| parent | drm/xe/oa/uapi: Expose media OA units (diff) | |
| download | linux-f3a3fd2c6f87f0e7d225019d7ed34c6bddf573f9.tar.gz linux-f3a3fd2c6f87f0e7d225019d7ed34c6bddf573f9.zip | |
drm/xe/oa: Print hwe to OA unit mapping
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>
Link: https://lore.kernel.org/r/20250606192618.4133817-3-ashutosh.dixit@intel.com
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/xe/xe_oa.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c index 0de0d5a18df7..e22405166db6 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; } |
