mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 23:51:37 +00:00
drm/ttm: fixup ttm_bo_add_move_fence v2
It looks like we still need to call dma_fence_put() on the man->move,
otherwise we just end up leaking it, leading to fireworks later.
v2(Daniel):
- Simplify the function tail
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5689
Fixes: 8bb3158782
("drm/ttm: remove bo->moving")
Cc: Christian König <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220413082133.272445-1-matthew.auld@intel.com
This commit is contained in:
parent
62c6f4f9bb
commit
7be2bb8c2f
@ -740,11 +740,8 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
|
||||
dma_resv_add_fence(bo->base.resv, fence, DMA_RESV_USAGE_KERNEL);
|
||||
|
||||
ret = dma_resv_reserve_fences(bo->base.resv, 1);
|
||||
if (unlikely(ret)) {
|
||||
dma_fence_put(fence);
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
dma_fence_put(fence);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user