[PATCH] drm/i915/debug: print time taken to read engine time stamp
Anshuman Gupta
anshuman.gupta at intel.com
Thu Oct 27 11:51:09 UTC 2022
print ns taken to read engine timestamps in gt_pm.
Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
---
drivers/gpu/drm/i915/gt/selftest_gt_pm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/selftest_gt_pm.c b/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
index be94f863bdef..52da0643a00c 100644
--- a/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/selftest_gt_pm.c
@@ -40,6 +40,7 @@ static void measure_clocks(struct intel_engine_cs *engine,
u32 *out_cycles, ktime_t *out_dt)
{
ktime_t dt[5];
+ ktime_t dt1;
u32 cycles[5];
int i;
@@ -51,7 +52,10 @@ static void measure_clocks(struct intel_engine_cs *engine,
udelay(1000);
dt[i] = ktime_sub(ktime_get(), dt[i]);
+ dt1 = ktime_get();
cycles[i] += ENGINE_READ_FW(engine, RING_TIMESTAMP);
+ dt1 = ktime_sub(ktime_get(), dt1);
+ pr_info("%s: time taken to read %lldns\n", engine->name, dt1);
local_irq_enable();
}
--
2.38.0
More information about the Intel-gfx-trybot
mailing list