diff options
| author | Christian König <christian.koenig@amd.com> | 2021-11-16 15:20:45 +0100 |
|---|---|---|
| committer | Christian König <christian.koenig@amd.com> | 2022-04-06 17:38:25 +0200 |
| commit | c8d4c18bfbc4ab467188dbe45cc8155759f49d9e (patch) | |
| tree | c0ecbde97d8d89bed2d7f87a93788bc86d5e56ea /drivers/gpu/drm/nouveau | |
| parent | 20b734c11243ecf97030345b51ff37fcb7dd060f (diff) | |
| download | linux-c8d4c18bfbc4ab467188dbe45cc8155759f49d9e.tar.gz linux-c8d4c18bfbc4ab467188dbe45cc8155759f49d9e.tar.bz2 linux-c8d4c18bfbc4ab467188dbe45cc8155759f49d9e.zip | |
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
Diffstat (limited to 'drivers/gpu/drm/nouveau')
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fence.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index a3a04e0d76ec..0268259e97eb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c @@ -346,11 +346,9 @@ nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan, struct dma_resv *resv = nvbo->bo.base.resv; int i, ret; - if (!exclusive) { - ret = dma_resv_reserve_shared(resv, 1); - if (ret) - return ret; - } + ret = dma_resv_reserve_fences(resv, 1); + if (ret) + return ret; /* Waiting for the exclusive fence first causes performance regressions * under some circumstances. So manually wait for the shared ones first. |
