[PATCH] drm/xe: Get XE_FORCEWAKE_ALL to read RING_TIMESTAMP
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Fri Jun 21 19:23:25 UTC 2024
Per client engine utilization uses RING_TIMESTAMP to return
drm-total-cycles to the user. We read only the rcs RING_TIMESTAMP in
platforms that have render. While this works for rcs and
ccs, it is observed that this value is 0 when running work on bcs, vcs
and vecs. Ideally we should read the engine specific RING_TIMESTAMP, but
to keep the logic simple, just get XE_FORCEWAKE_ALL instead of XE_GT_FW.
This should work fine on multi-gt platforms as well since the
gt_timestamp is in sync on all GTs.
Fixes: 188ced1e0ff8 ("drm/xe/client: Print runtime to fdinfo")
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
---
drivers/gpu/drm/xe/xe_drm_client.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index 4a19b771e3a0..74f2244679f3 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -264,9 +264,9 @@ static void show_run_ticks(struct drm_printer *p, struct drm_file *file)
if (!hwe)
continue;
- xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
+ xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
gpu_timestamp = xe_hw_engine_read_timestamp(hwe);
- xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
+ xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL);
break;
}
--
2.34.1
More information about the Intel-xe
mailing list