diff options
author | Maíra Canal <mcanal@igalia.com> | 2024-04-20 18:32:10 -0300 |
---|---|---|
committer | Maíra Canal <mcanal@igalia.com> | 2024-04-23 19:32:46 -0300 |
commit | b136b1953f201542ae5cdfee4b35e9a2e4aa16fa (patch) | |
tree | 288713b26ffcd069669079e83f435c37e7dbcca6 /drivers/gpu/drm/v3d/v3d_gem.c | |
parent | 52ce97765cc71708acfd2a66b71e6cd3abb096d8 (diff) | |
download | lwn-b136b1953f201542ae5cdfee4b35e9a2e4aa16fa.tar.gz lwn-b136b1953f201542ae5cdfee4b35e9a2e4aa16fa.zip |
drm/v3d: Create a struct to store the GPU stats
This will make it easier to instantiate the GPU stats variables and it
will create a structure where we can store all the variables that refer
to GPU stats.
Note that, when we created the struct `v3d_stats`, we renamed
`jobs_sent` to `jobs_completed`. This better express the semantics of
the variable, as we are only accounting jobs that have been completed.
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240420213632.339941-4-mcanal@igalia.com
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_gem.c')
-rw-r--r-- | drivers/gpu/drm/v3d/v3d_gem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index afc565078c78..0086081a9261 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++ b/drivers/gpu/drm/v3d/v3d_gem.c @@ -247,10 +247,10 @@ v3d_gem_init(struct drm_device *dev) int ret, i; for (i = 0; i < V3D_MAX_QUEUES; i++) { - v3d->queue[i].fence_context = dma_fence_context_alloc(1); - v3d->queue[i].start_ns = 0; - v3d->queue[i].enabled_ns = 0; - v3d->queue[i].jobs_sent = 0; + struct v3d_queue_state *queue = &v3d->queue[i]; + + queue->fence_context = dma_fence_context_alloc(1); + memset(&queue->stats, 0, sizeof(queue->stats)); } spin_lock_init(&v3d->mm_lock); |