[PATCH] i915/pmu: Debug pmu failures
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Wed Apr 16 19:57:02 UTC 2025
Dump debug info for PMU failures. Trybot only.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index f8cb7c630d5b..918a6d63dad4 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -1258,6 +1258,8 @@ static void __set_engine_usage_record(struct intel_engine_cs *engine,
#undef record_write
}
+#define busy_print pr_alert
+
static void guc_update_engine_gt_clks(struct intel_engine_cs *engine)
{
struct intel_engine_guc_stats *stats = &engine->stats.guc;
@@ -1267,6 +1269,8 @@ static void guc_update_engine_gt_clks(struct intel_engine_cs *engine)
lockdep_assert_held(&guc->timestamp.lock);
__get_engine_usage_record(engine, &last_switch, &ctx_id, &total);
+ busy_print("%s: last_switch = %u, ctx_id %08x, total %u\n",
+ engine->name, last_switch, ctx_id, total);
stats->running = ctx_id != ~0U && last_switch;
if (stats->running)
@@ -1280,6 +1284,8 @@ static void guc_update_engine_gt_clks(struct intel_engine_cs *engine)
stats->total_gt_clks += (u32)(total - stats->prev_total);
stats->prev_total = total;
}
+ busy_print("%s: running = %u, start_gt_clk = %llu, total_gt_clks = %llu\n",
+ engine->name, stats->running, stats->start_gt_clk, stats->total_gt_clks);
}
static u32 gpm_timestamp_shift(struct intel_gt *gt)
@@ -1311,6 +1317,7 @@ static void guc_update_pm_timestamp(struct intel_guc *guc, ktime_t *now)
gt_stamp_hi++;
guc->timestamp.gt_stamp = ((u64)gt_stamp_hi << 32) | gt_stamp_lo;
+ busy_print("[%d] gt timestamp %lld\n", gt->info.id, guc->timestamp.gt_stamp);
}
/*
@@ -1372,9 +1379,11 @@ static ktime_t guc_engine_busyness(struct intel_engine_cs *engine, ktime_t *now)
if (stats->running) {
u64 clk = guc->timestamp.gt_stamp - stats->start_gt_clk;
+ busy_print("%s: STILL RUNNING\n", engine->name);
total += intel_gt_clock_interval_to_ns(gt, clk);
}
+ busy_print("%s: total %llu, stats->total %llu\n", engine->name, total, stats->total);
if (total > stats->total)
stats->total = total;
--
2.43.0
More information about the Intel-gfx-trybot
mailing list