]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: fix amdgpu_sync_resv v2
authorChristian König <christian.koenig@amd.com>
Fri, 24 Nov 2017 10:41:52 +0000 (11:41 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Dec 2017 17:48:32 +0000 (12:48 -0500)
Fixes a bug introduced by AMDGPU_GEM_CREATE_EXPLICIT_SYNC. We still need
to wait for pipelined moves in the shared fences list.

v2: fix typo

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Andres Rodriguez <andresx7@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c

index f3d1a25b660f9db110d9efc6efc4c3d585a2fb69..ebe1ffbab0c1ddd91f70be72c37d24ef789f2919 100644 (file)
@@ -194,9 +194,6 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
        f = reservation_object_get_excl(resv);
        r = amdgpu_sync_fence(adev, sync, f, false);
 
-       if (explicit_sync)
-               return r;
-
        flist = reservation_object_get_list(resv);
        if (!flist || r)
                return r;
@@ -215,11 +212,11 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
                             (fence_owner == AMDGPU_FENCE_OWNER_VM)))
                                continue;
 
-                       /* Ignore fence from the same owner as
+                       /* Ignore fence from the same owner and explicit one as
                         * long as it isn't undefined.
                         */
                        if (owner != AMDGPU_FENCE_OWNER_UNDEFINED &&
-                           fence_owner == owner)
+                           (fence_owner == owner || explicit_sync))
                                continue;
                }