summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/v3d/v3d_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_sysfs.c')
-rw-r--r--drivers/gpu/drm/v3d/v3d_sysfs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_sysfs.c b/drivers/gpu/drm/v3d/v3d_sysfs.c
index d106845ba890..6a8e7acc8b82 100644
--- a/drivers/gpu/drm/v3d/v3d_sysfs.c
+++ b/drivers/gpu/drm/v3d/v3d_sysfs.c
@@ -21,8 +21,10 @@ gpu_stats_show(struct device *dev, struct device_attribute *attr, char *buf)
len += sysfs_emit(buf, "queue\ttimestamp\tjobs\truntime\n");
for (queue = 0; queue < V3D_MAX_QUEUES; queue++) {
- if (v3d->queue[queue].start_ns)
- active_runtime = timestamp - v3d->queue[queue].start_ns;
+ struct v3d_stats *stats = &v3d->queue[queue].stats;
+
+ if (stats->start_ns)
+ active_runtime = timestamp - stats->start_ns;
else
active_runtime = 0;
@@ -39,8 +41,8 @@ gpu_stats_show(struct device *dev, struct device_attribute *attr, char *buf)
len += sysfs_emit_at(buf, len, "%s\t%llu\t%llu\t%llu\n",
v3d_queue_to_string(queue),
timestamp,
- v3d->queue[queue].jobs_sent,
- v3d->queue[queue].enabled_ns + active_runtime);
+ stats->jobs_completed,
+ stats->enabled_ns + active_runtime);
}
return len;