Skip to content

Commit cda7532

Browse files
committed
drm/etnaviv: put submit prev MMU context when it exists
The prev context is the MMU context at the time of the job queueing in hardware. As a job might be queued multiple times due to recovery after a GPU hang, we need to make sure to put the stale prev MMU context from a prior queuing, to avoid the reference and thus the MMU context leaking. Cc: [email protected] # 5.4 Signed-off-by: Lucas Stach <[email protected]> Tested-by: Michael Walle <[email protected]> Tested-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
1 parent 78edefc commit cda7532

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/etnaviv/etnaviv_gpu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,8 @@ struct dma_fence *etnaviv_gpu_submit(struct etnaviv_gem_submit *submit)
13741374
gpu->mmu_context = etnaviv_iommu_context_get(submit->mmu_context);
13751375
etnaviv_gpu_start_fe_idleloop(gpu);
13761376
} else {
1377+
if (submit->prev_mmu_context)
1378+
etnaviv_iommu_context_put(submit->prev_mmu_context);
13771379
submit->prev_mmu_context = etnaviv_iommu_context_get(gpu->mmu_context);
13781380
}
13791381

0 commit comments

Comments
 (0)