Skip to content

Commit 35f4f8c

Browse files
committed
drm/v3d: Don't increment enabled_ns twice
The commit 509433d ("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 09a93cc ("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 509433d ("drm/v3d: Expose the total GPU usage stats on sysfs"). Fixes: 509433d ("drm/v3d: Expose the total GPU usage stats on sysfs") Reported-by: Tvrtko Ursulin <[email protected]> Signed-off-by: Maíra Canal <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Reviewed-by: Jose Maria Casanova Crespo <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent d4c972b commit 35f4f8c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/gpu/drm/v3d/v3d_irq.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ v3d_irq(int irq, void *arg)
105105
struct v3d_file_priv *file = v3d->bin_job->base.file->driver_priv;
106106
u64 runtime = local_clock() - file->start_ns[V3D_BIN];
107107

108-
file->enabled_ns[V3D_BIN] += local_clock() - file->start_ns[V3D_BIN];
109108
file->jobs_sent[V3D_BIN]++;
110109
v3d->queue[V3D_BIN].jobs_sent++;
111110

@@ -126,7 +125,6 @@ v3d_irq(int irq, void *arg)
126125
struct v3d_file_priv *file = v3d->render_job->base.file->driver_priv;
127126
u64 runtime = local_clock() - file->start_ns[V3D_RENDER];
128127

129-
file->enabled_ns[V3D_RENDER] += local_clock() - file->start_ns[V3D_RENDER];
130128
file->jobs_sent[V3D_RENDER]++;
131129
v3d->queue[V3D_RENDER].jobs_sent++;
132130

@@ -147,7 +145,6 @@ v3d_irq(int irq, void *arg)
147145
struct v3d_file_priv *file = v3d->csd_job->base.file->driver_priv;
148146
u64 runtime = local_clock() - file->start_ns[V3D_CSD];
149147

150-
file->enabled_ns[V3D_CSD] += local_clock() - file->start_ns[V3D_CSD];
151148
file->jobs_sent[V3D_CSD]++;
152149
v3d->queue[V3D_CSD].jobs_sent++;
153150

@@ -195,7 +192,6 @@ v3d_hub_irq(int irq, void *arg)
195192
struct v3d_file_priv *file = v3d->tfu_job->base.file->driver_priv;
196193
u64 runtime = local_clock() - file->start_ns[V3D_TFU];
197194

198-
file->enabled_ns[V3D_TFU] += local_clock() - file->start_ns[V3D_TFU];
199195
file->jobs_sent[V3D_TFU]++;
200196
v3d->queue[V3D_TFU].jobs_sent++;
201197

0 commit comments

Comments
 (0)