Patch "drm/v3d: Enable Performance Counters before clearing them" has been added to the 6.6-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/v3d: Enable Performance Counters before clearing them

to the 6.6-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-v3d-enable-performance-counters-before-clearing-.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 95eb5cf9a46206a46f4ea01452566b78d9ea9434
Author: Maíra Canal <mcanal@xxxxxxxxxx>
Date:   Wed Dec 4 09:28:31 2024 -0300

    drm/v3d: Enable Performance Counters before clearing them
    
    [ Upstream commit c98b10496b2f3c4f576af3482c71aadcfcbf765e ]
    
    On the Raspberry Pi 5, performance counters are not being cleared
    when `v3d_perfmon_start()` is called, even though we write to the
    CLR register. As a result, their values accumulate until they
    overflow.
    
    The expected behavior is for performance counters to reset to zero
    at the start of a job. When the job finishes and the perfmon is
    stopped, the counters should accurately reflect the values for that
    specific job.
    
    To ensure this behavior, the performance counters are now enabled
    before being cleared. This allows the CLR register to function as
    intended, zeroing the counter values when the job begins.
    
    Fixes: 26a4dc29b74a ("drm/v3d: Expose performance counters to userspace")
    Signed-off-by: Maíra Canal <mcanal@xxxxxxxxxx>
    Reviewed-by: Iago Toral Quiroga <itoral@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20241204122831.17015-1-mcanal@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/v3d/v3d_perfmon.c b/drivers/gpu/drm/v3d/v3d_perfmon.c
index 73b9c92dc0fc5..141b8abf08629 100644
--- a/drivers/gpu/drm/v3d/v3d_perfmon.c
+++ b/drivers/gpu/drm/v3d/v3d_perfmon.c
@@ -51,9 +51,9 @@ void v3d_perfmon_start(struct v3d_dev *v3d, struct v3d_perfmon *perfmon)
 		V3D_CORE_WRITE(0, V3D_V4_PCTR_0_SRC_X(source), channel);
 	}
 
+	V3D_CORE_WRITE(0, V3D_V4_PCTR_0_EN, mask);
 	V3D_CORE_WRITE(0, V3D_V4_PCTR_0_CLR, mask);
 	V3D_CORE_WRITE(0, V3D_PCTR_0_OVERFLOW, mask);
-	V3D_CORE_WRITE(0, V3D_V4_PCTR_0_EN, mask);
 
 	v3d->active_perfmon = perfmon;
 }




[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