mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
drm/msm: make sure last_fence is always updated
Update last_fence in the vm-bind path instead of kernel managed path.
last_fence is used to wait for work to finish in vm_bind contexts but not
used for kernel managed contexts.
This fixes a bug where last_fence is not waited on context close leading
to faults as resources are freed while in use.
Fixes: 92395af63a ("drm/msm: Add VM_BIND submitqueue")
Signed-off-by: Anna Maniscalco <anna.maniscalco2000@gmail.com>
Patchwork: https://patchwork.freedesktop.org/patch/680080/
Message-ID: <20251011-close_fence_wait_fix-v3-1-5134787755ff@gmail.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
This commit is contained in:
parent
b4789aac9d
commit
86404a9e30
|
|
@ -414,6 +414,11 @@ static void submit_attach_object_fences(struct msm_gem_submit *submit)
|
|||
submit->user_fence,
|
||||
DMA_RESV_USAGE_BOOKKEEP,
|
||||
DMA_RESV_USAGE_BOOKKEEP);
|
||||
|
||||
last_fence = vm->last_fence;
|
||||
vm->last_fence = dma_fence_unwrap_merge(submit->user_fence, last_fence);
|
||||
dma_fence_put(last_fence);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -427,10 +432,6 @@ static void submit_attach_object_fences(struct msm_gem_submit *submit)
|
|||
dma_resv_add_fence(obj->resv, submit->user_fence,
|
||||
DMA_RESV_USAGE_READ);
|
||||
}
|
||||
|
||||
last_fence = vm->last_fence;
|
||||
vm->last_fence = dma_fence_unwrap_merge(submit->user_fence, last_fence);
|
||||
dma_fence_put(last_fence);
|
||||
}
|
||||
|
||||
static int submit_bo(struct msm_gem_submit *submit, uint32_t idx,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user