Patch "drm/imagination: Fix timestamps in firmware traces" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/imagination: Fix timestamps in firmware traces

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-imagination-fix-timestamps-in-firmware-traces.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d5dba737045d82588540685e7f89dc74a33f79b0
Author: Alessio Belle <alessio.belle@xxxxxxxxxx>
Date:   Fri Feb 21 10:49:35 2025 +0000

    drm/imagination: Fix timestamps in firmware traces
    
    [ Upstream commit 1d2eabb6616433ccaa13927811bdfa205e91ba60 ]
    
    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: cb56cd610866 ("drm/imagination: Add firmware trace to debugfs")
    Signed-off-by: Alessio Belle <alessio.belle@xxxxxxxxxx>
    Reviewed-by: Matt Coster <matt.coster@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250221-fix-fw-trace-timestamps-v1-1-dba4aeb030ca@xxxxxxxxxx
    Signed-off-by: Matt Coster <matt.coster@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/imagination/pvr_fw_trace.c b/drivers/gpu/drm/imagination/pvr_fw_trace.c
index 73707daa4e52d..5dbb636d7d4ff 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_trace.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_trace.c
@@ -333,8 +333,8 @@ static int fw_trace_seq_show(struct seq_file *s, void *v)
 	if (sf_id == ROGUE_FW_SF_LAST)
 		return -EINVAL;
 
-	timestamp = read_fw_trace(trace_seq_data, 1) |
-		((u64)read_fw_trace(trace_seq_data, 2) << 32);
+	timestamp = ((u64)read_fw_trace(trace_seq_data, 1) << 32) |
+		read_fw_trace(trace_seq_data, 2);
 	timestamp = (timestamp & ~ROGUE_FWT_TIMESTAMP_TIME_CLRMSK) >>
 		ROGUE_FWT_TIMESTAMP_TIME_SHIFT;
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux