summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2023-06-07 15:02:17 +0200
committerLucas Stach <l.stach@pengutronix.de>2023-07-17 11:32:10 +0200
commit80f6b63e729fbda4ea9cce86cc317f69b8ba2ede (patch)
treee95be55b41e99a396be3f0f2302862c65ae87f1a /drivers/gpu/drm/etnaviv/etnaviv_gpu.c
parentdrm/etnaviv: move down etnaviv_gpu_recover_hang() in file (diff)
downloadlinux-80f6b63e729fbda4ea9cce86cc317f69b8ba2ede.tar.xz
linux-80f6b63e729fbda4ea9cce86cc317f69b8ba2ede.zip
drm/etnaviv: free events the usual way in recover worker
Clearing the whole bitmap at once is only a minor optimization in a path that should be extremely cold. Free the events by calling event_free() instead of directly manipulating the completion count and event bitmap. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_gpu.c')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gpu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 92790715ae7f..e067a27818d1 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1450,8 +1450,7 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gem_submit *submit)
/* complete all events, the GPU won't do it after the reset */
spin_lock(&gpu->event_spinlock);
for_each_set_bit(i, gpu->event_bitmap, ETNA_NR_EVENTS)
- complete(&gpu->event_free);
- bitmap_zero(gpu->event_bitmap, ETNA_NR_EVENTS);
+ event_free(gpu, i);
spin_unlock(&gpu->event_spinlock);
etnaviv_gpu_hw_init(gpu);