drm/amdgpu: remove excl as shared workarounds
authorChristian König <christian.koenig@amd.com>
Wed, 3 Nov 2021 09:37:06 +0000 (10:37 +0100)
committerChristian König <christian.koenig@amd.com>
Wed, 19 Jan 2022 07:25:50 +0000 (08:25 +0100)
This was added because of the now dropped shared on excl dependency.

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/20211123142111.3885-15-christian.koenig@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c

index 0311d799a010d5f8a6fc5f8c177624fc8ff82393..53e407ea4c894f245176e9ed08e99d811bb4e930 100644 (file)
@@ -1275,14 +1275,11 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
                /*
                 * Work around dma_resv shortcommings by wrapping up the
                 * submission in a dma_fence_chain and add it as exclusive
-                * fence, but first add the submission as shared fence to make
-                * sure that shared fences never signal before the exclusive
-                * one.
+                * fence.
                 */
                dma_fence_chain_init(chain, dma_resv_excl_fence(resv),
                                     dma_fence_get(p->fence), 1);
 
-               dma_resv_add_shared_fence(resv, p->fence);
                rcu_assign_pointer(resv->fence_excl, &chain->base);
                e->chain = NULL;
        }
index c0d8f40a5b45cb861c27bd226ee2f4293a74d00c..9b12cab5e60676ddf3a3d73c5f5f8c3b2259bdec 100644 (file)
@@ -226,12 +226,6 @@ static void amdgpu_gem_object_close(struct drm_gem_object *obj,
        if (!amdgpu_vm_ready(vm))
                goto out_unlock;
 
-       fence = dma_resv_excl_fence(bo->tbo.base.resv);
-       if (fence) {
-               amdgpu_bo_fence(bo, fence, true);
-               fence = NULL;
-       }
-
        r = amdgpu_vm_clear_freed(adev, vm, &fence);
        if (r || !fence)
                goto out_unlock;