Patch "drm/v3d: Don't increment `enabled_ns` twice" has been added to the 6.8-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: Don't increment `enabled_ns` twice

to the 6.8-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-don-t-increment-enabled_ns-twice.patch
and it can be found in the queue-6.8 subdirectory.

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



commit 3199f618fdb2141a09f214001a7f9c9781f774f5
Author: Maíra Canal <mcanal@xxxxxxxxxx>
Date:   Wed Apr 3 17:24:50 2024 -0300

    drm/v3d: Don't increment `enabled_ns` twice
    
    [ Upstream commit 35f4f8c9fc972248055096d63b782060e473311b ]
    
    The commit 509433d8146c ("drm/v3d: Expose the total GPU usage stats on sysfs")
    introduced the calculation of global GPU stats. For the regards, it used
    the already existing infrastructure provided by commit 09a93cc4f7d1 ("drm/v3d:
    Implement show_fdinfo() callback for GPU usage stats"). While adding
    global GPU stats calculation ability, the author forgot to delete the
    existing one.
    
    Currently, the value of `enabled_ns` is incremented twice by the end of
    the job, when it should be added just once. Therefore, delete the
    leftovers from commit 509433d8146c ("drm/v3d: Expose the total GPU usage
    stats on sysfs").
    
    Fixes: 509433d8146c ("drm/v3d: Expose the total GPU usage stats on sysfs")
    Reported-by: Tvrtko Ursulin <tursulin@xxxxxxxxxx>
    Signed-off-by: Maíra Canal <mcanal@xxxxxxxxxx>
    Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxx>
    Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240403203517.731876-2-mcanal@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/v3d/v3d_irq.c b/drivers/gpu/drm/v3d/v3d_irq.c
index afc76390a197a..b8f9f2a3d2fb3 100644
--- a/drivers/gpu/drm/v3d/v3d_irq.c
+++ b/drivers/gpu/drm/v3d/v3d_irq.c
@@ -105,7 +105,6 @@ v3d_irq(int irq, void *arg)
 		struct v3d_file_priv *file = v3d->bin_job->base.file->driver_priv;
 		u64 runtime = local_clock() - file->start_ns[V3D_BIN];
 
-		file->enabled_ns[V3D_BIN] += local_clock() - file->start_ns[V3D_BIN];
 		file->jobs_sent[V3D_BIN]++;
 		v3d->queue[V3D_BIN].jobs_sent++;
 
@@ -126,7 +125,6 @@ v3d_irq(int irq, void *arg)
 		struct v3d_file_priv *file = v3d->render_job->base.file->driver_priv;
 		u64 runtime = local_clock() - file->start_ns[V3D_RENDER];
 
-		file->enabled_ns[V3D_RENDER] += local_clock() - file->start_ns[V3D_RENDER];
 		file->jobs_sent[V3D_RENDER]++;
 		v3d->queue[V3D_RENDER].jobs_sent++;
 
@@ -147,7 +145,6 @@ v3d_irq(int irq, void *arg)
 		struct v3d_file_priv *file = v3d->csd_job->base.file->driver_priv;
 		u64 runtime = local_clock() - file->start_ns[V3D_CSD];
 
-		file->enabled_ns[V3D_CSD] += local_clock() - file->start_ns[V3D_CSD];
 		file->jobs_sent[V3D_CSD]++;
 		v3d->queue[V3D_CSD].jobs_sent++;
 
@@ -195,7 +192,6 @@ v3d_hub_irq(int irq, void *arg)
 		struct v3d_file_priv *file = v3d->tfu_job->base.file->driver_priv;
 		u64 runtime = local_clock() - file->start_ns[V3D_TFU];
 
-		file->enabled_ns[V3D_TFU] += local_clock() - file->start_ns[V3D_TFU];
 		file->jobs_sent[V3D_TFU]++;
 		v3d->queue[V3D_TFU].jobs_sent++;
 




[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