linux/drivers/gpu/drm/imagination
Alessio Belle 1d2eabb661
drm/imagination: Fix timestamps in firmware traces
When firmware traces are enabled, the firmware dumps 48-bit timestamps
for each trace as two 32-bit values, highest 32 bits (of which only 16
useful) first.

The driver was reassembling them the other way round i.e. interpreting
the first value in memory as the lowest 32 bits, and the second value
as the highest 32 bits (then truncated to 16 bits).

Due to this, firmware trace dumps showed very large timestamps even for
traces recorded shortly after GPU boot. The timestamps in these dumps
would also sometimes jump backwards because of the truncation.

Example trace dumped after loading the powervr module and enabling
firmware traces, where each line is commented with the timestamp value
in hexadecimal to better show both issues:

[93540092739584] : Host Sync Partition marker: 1    // 0x551300000000
[28419798597632] : GPU units deinit                 // 0x19d900000000
[28548647616512] : GPU deinit                       // 0x19f700000000

Update logic to reassemble the timestamps halves in the correct order.

Fixes: cb56cd6108 ("drm/imagination: Add firmware trace to debugfs")
Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250221-fix-fw-trace-timestamps-v1-1-dba4aeb030ca@imgtec.com
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
2025-03-03 12:15:55 +00:00
..
Kconfig
Makefile drm/imagination: remove unnecessary header include path 2025-02-26 09:54:57 +00:00
pvr_ccb.c drm/imagination: Convert to use time_before macro 2024-08-30 15:17:03 +01:00
pvr_ccb.h
pvr_cccb.c
pvr_cccb.h
pvr_context.c drm for 6.13-rc1 2024-11-21 14:56:17 -08:00
pvr_context.h drm/imagination: Break an object reference loop 2024-11-04 09:41:38 +00:00
pvr_debugfs.c
pvr_debugfs.h
pvr_device.c drm/imagination: pvr_device_process_active_queues now static 2023-12-04 09:41:59 +01:00
pvr_device.h drm/imagination: Add a per-file PVR context list 2024-11-04 09:41:32 +00:00
pvr_device_info.c
pvr_device_info.h
pvr_drv.c Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2024-12-09 16:35:21 +01:00
pvr_drv.h drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
pvr_free_list.c
pvr_free_list.h
pvr_fw.c
pvr_fw.h
pvr_fw_info.h
pvr_fw_meta.c drm/imagination: Hold drm_gem_gpuva lock for unmap 2025-03-03 12:09:00 +00:00
pvr_fw_meta.h
pvr_fw_mips.c
pvr_fw_mips.h drm/imagination: Ensure PVR_MIPS_PT_PAGE_COUNT is never zero 2024-04-29 12:31:28 +01:00
pvr_fw_startstop.c
pvr_fw_startstop.h
pvr_fw_trace.c drm/imagination: Fix timestamps in firmware traces 2025-03-03 12:15:55 +00:00
pvr_fw_trace.h
pvr_gem.c
pvr_gem.h
pvr_hwrt.c drm/imagination: Fixed oops when misusing ioctl CREATE_HWRT_DATASET 2023-12-15 14:04:08 +01:00
pvr_hwrt.h
pvr_job.c drm/imagination: Use memdup_user() helper to simplify code 2024-09-02 09:54:13 +01:00
pvr_job.h
pvr_mmu.c drm/imagination: Move dereference after NULL check in pvr_mmu_backing_page_init() 2023-12-08 10:25:24 +01:00
pvr_mmu.h
pvr_params.c
pvr_params.h
pvr_power.c
pvr_power.h
pvr_queue.c drm/imagination: only init job done fences once 2025-03-03 12:10:13 +00:00
pvr_queue.h drm/imagination: avoid deadlock on fence release 2025-03-03 12:07:56 +00:00
pvr_rogue_cr_defs.h
pvr_rogue_cr_defs_client.h
pvr_rogue_defs.h
pvr_rogue_fwif.h
pvr_rogue_fwif_check.h
pvr_rogue_fwif_client.h
pvr_rogue_fwif_client_check.h
pvr_rogue_fwif_common.h
pvr_rogue_fwif_dev_info.h
pvr_rogue_fwif_resetframework.h
pvr_rogue_fwif_sf.h
pvr_rogue_fwif_shared.h
pvr_rogue_fwif_shared_check.h
pvr_rogue_fwif_stream.h
pvr_rogue_heap_config.h
pvr_rogue_meta.h
pvr_rogue_mips.h
pvr_rogue_mips_check.h
pvr_rogue_mmu_defs.h
pvr_stream.c
pvr_stream.h
pvr_stream_defs.c
pvr_stream_defs.h
pvr_sync.c
pvr_sync.h
pvr_vm.c drm/imagination: Hold drm_gem_gpuva lock for unmap 2025-03-03 12:09:00 +00:00
pvr_vm.h drm/imagination: Hold drm_gem_gpuva lock for unmap 2025-03-03 12:09:00 +00:00
pvr_vm_mips.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
pvr_vm_mips.h