summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-11-29 14:33:57 +0100
committerLucas Stach <l.stach@pengutronix.de>2018-01-02 17:36:28 +0100
commit2e3a2dda2515cc85b8600e3d8a20d1d4a9100ebd (patch)
tree991ac33ab8658da1fce0e3b52b716d47aa28f395 /drivers/gpu/drm
parenta7cfa565d48ff08f7df95d59c963ce1381526c30 (diff)
drm/etnaviv: move submit free out of critical section
There is no need to hold the GPU lock while freeing the submit object. Only move the retired submits from the GPU active list to a temporary retire list under the GPU lock. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gpu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 072384f3637e..21d0d22f1168 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1201,20 +1201,22 @@ static void retire_worker(struct work_struct *work)
retire_work);
u32 fence = gpu->completed_fence;
struct etnaviv_gem_submit *submit, *tmp;
+ LIST_HEAD(retire_list);
mutex_lock(&gpu->lock);
list_for_each_entry_safe(submit, tmp, &gpu->active_submit_list, node) {
if (!dma_fence_is_signaled(submit->out_fence))
break;
- list_del(&submit->node);
-
- etnaviv_submit_put(submit);
+ list_move(&submit->node, &retire_list);
}
gpu->retired_fence = fence;
mutex_unlock(&gpu->lock);
+
+ list_for_each_entry_safe(submit, tmp, &retire_list, node)
+ etnaviv_submit_put(submit);
}
int etnaviv_gpu_wait_fence_interruptible(struct etnaviv_gpu *gpu,