summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_guc_log.c
diff options
context:
space:
mode:
authorJohn Harrison <John.C.Harrison@Intel.com>2024-10-23 17:25:53 -0700
committerJohn Harrison <John.C.Harrison@Intel.com>2024-10-29 13:11:33 -0700
commit833b2ec3bd5d18b85d8a3f416ca590a44bc4f58c (patch)
tree906ced38482bb67de82f74158cf769995b52b089 /drivers/gpu/drm/xe/xe_guc_log.c
parent55858fa7eb2f163f7aa34339fd3399ba4ff564c6 (diff)
drm/xe/guc: Capture all available bits of GuC timestamp
The extra bits are not hugely useful because the GuC log only uses 32bit time stamps. But they exist so might as well provide them. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241024002554.1983101-2-John.C.Harrison@Intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/xe_guc_log.c')
-rw-r--r--drivers/gpu/drm/xe/xe_guc_log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_log.c b/drivers/gpu/drm/xe/xe_guc_log.c
index fead96216243..df4cfb698cdb 100644
--- a/drivers/gpu/drm/xe/xe_guc_log.c
+++ b/drivers/gpu/drm/xe/xe_guc_log.c
@@ -171,9 +171,9 @@ struct xe_guc_log_snapshot *xe_guc_log_snapshot_capture(struct xe_guc_log *log,
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
if (!fw_ref) {
- snapshot->stamp = ~0;
+ snapshot->stamp = ~0ULL;
} else {
- snapshot->stamp = xe_mmio_read32(&gt->mmio, GUC_PMTIMESTAMP);
+ snapshot->stamp = xe_mmio_read64_2x32(&gt->mmio, GUC_PMTIMESTAMP_LO);
xe_force_wake_put(gt_to_fw(gt), fw_ref);
}
snapshot->ktime = ktime_get_boottime_ns();
@@ -205,7 +205,7 @@ void xe_guc_log_snapshot_print(struct xe_guc_log_snapshot *snapshot, struct drm_
snapshot->ver_found.major, snapshot->ver_found.minor, snapshot->ver_found.patch,
snapshot->ver_want.major, snapshot->ver_want.minor, snapshot->ver_want.patch);
drm_printf(p, "Kernel timestamp: 0x%08llX [%llu]\n", snapshot->ktime, snapshot->ktime);
- drm_printf(p, "GuC timestamp: 0x%08X [%u]\n", snapshot->stamp, snapshot->stamp);
+ drm_printf(p, "GuC timestamp: 0x%08llX [%llu]\n", snapshot->stamp, snapshot->stamp);
drm_printf(p, "Log level: %u\n", snapshot->level);
remain = snapshot->size;