mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
dma-buf/drivers: make reserving a shared slot mandatory v4
Audit all the users of dma_resv_add_excl_fence() and make sure they reserve a shared slot also when only trying to add an exclusive fence. This is the next step towards handling the exclusive fence like a shared one. v2: fix missed case in amdgpu v3: and two more radeon, rename function v4: add one more case to TTM, fix i915 after rebase Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20220406075132.3263-2-christian.koenig@amd.com
This commit is contained in:
@@ -998,11 +998,9 @@ static int eb_validate_vmas(struct i915_execbuffer *eb)
|
||||
}
|
||||
}
|
||||
|
||||
if (!(ev->flags & EXEC_OBJECT_WRITE)) {
|
||||
err = dma_resv_reserve_shared(vma->obj->base.resv, 1);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
err = dma_resv_reserve_fences(vma->obj->base.resv, 1);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
GEM_BUG_ON(drm_mm_node_allocated(&vma->node) &&
|
||||
eb_vma_misplaced(&eb->exec[i], vma, ev->flags));
|
||||
@@ -2303,7 +2301,7 @@ static int eb_parse(struct i915_execbuffer *eb)
|
||||
if (IS_ERR(batch))
|
||||
return PTR_ERR(batch);
|
||||
|
||||
err = dma_resv_reserve_shared(shadow->obj->base.resv, 1);
|
||||
err = dma_resv_reserve_fences(shadow->obj->base.resv, 1);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user