drm/amdgpu: remove AMDGPU_FENCE_OWNER_MOVE
authorChristian König <christian.koenig@amd.com>
Tue, 27 Oct 2015 16:28:24 +0000 (17:28 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 Nov 2015 17:29:23 +0000 (12:29 -0500)
Moves are exclusive operations anyway, just use the undefined owner for those.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index e615fffdb3f2a5abdcb9698880d3ce981f737d86..5961d63f89137a5f1c5f749250a51040b1123076 100644 (file)
@@ -405,7 +405,6 @@ struct amdgpu_fence_driver {
 /* some special values for the owner field */
 #define AMDGPU_FENCE_OWNER_UNDEFINED   ((void*)0ul)
 #define AMDGPU_FENCE_OWNER_VM          ((void*)1ul)
-#define AMDGPU_FENCE_OWNER_MOVE                ((void*)2ul)
 
 #define AMDGPU_FENCE_FLAG_64BIT         (1 << 0)
 #define AMDGPU_FENCE_FLAG_INT           (1 << 1)
index c6489b198a994f92a6eba9ba4215fd231ee6fa89..a6697fd0521713cd9f60cbd7a2508b02e954b470 100644 (file)
@@ -191,8 +191,8 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
                         * for other VM updates and moves.
                         */
                        fence_owner = amdgpu_sync_get_owner(f);
-                       if ((owner != AMDGPU_FENCE_OWNER_MOVE) &&
-                           (fence_owner != AMDGPU_FENCE_OWNER_MOVE) &&
+                       if ((owner != AMDGPU_FENCE_OWNER_UNDEFINED) &&
+                           (fence_owner != AMDGPU_FENCE_OWNER_UNDEFINED) &&
                            ((owner == AMDGPU_FENCE_OWNER_VM) !=
                             (fence_owner == AMDGPU_FENCE_OWNER_VM)))
                                continue;
index a089e69e9927610666ff9fb26c2be008335a473a..81bb8e9fc26dc2accddd19355d81461712420ef8 100644 (file)
@@ -1041,7 +1041,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring,
        WARN_ON(ib->length_dw > num_dw);
        r = amdgpu_sched_ib_submit_kernel_helper(adev, ring, ib, 1,
                                                 &amdgpu_vm_free_job,
-                                                AMDGPU_FENCE_OWNER_MOVE,
+                                                AMDGPU_FENCE_OWNER_UNDEFINED,
                                                 fence);
        if (r)
                goto error_free;