aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0506-drm-amdgpu-only-update-last_flush-when-vmid-doesn-t-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0506-drm-amdgpu-only-update-last_flush-when-vmid-doesn-t-.patch')
-rw-r--r--common/recipes-kernel/linux/files/0506-drm-amdgpu-only-update-last_flush-when-vmid-doesn-t-.patch68
1 files changed, 0 insertions, 68 deletions
diff --git a/common/recipes-kernel/linux/files/0506-drm-amdgpu-only-update-last_flush-when-vmid-doesn-t-.patch b/common/recipes-kernel/linux/files/0506-drm-amdgpu-only-update-last_flush-when-vmid-doesn-t-.patch
deleted file mode 100644
index 00cb2f9c..00000000
--- a/common/recipes-kernel/linux/files/0506-drm-amdgpu-only-update-last_flush-when-vmid-doesn-t-.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 38cc13ce129ab201aa74dc39edf5f46d43635bf3 Mon Sep 17 00:00:00 2001
-From: Chunming Zhou <David1.Zhou@amd.com>
-Date: Thu, 14 Apr 2016 13:42:32 +0800
-Subject: [PATCH 0506/1110] drm/amdgpu: only update last_flush when vmid
- doesn't have other new owner
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
-Reviewed-by: Christian K├Ânig <christian.koenig@amd.com>
-Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-Signed-off-by: Kalyan Alle <kalyan.alle@amd.com>
----
- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +
- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 15 ++++++++++-----
- 2 files changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
-index 95ea8d7..0214003 100644
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
-@@ -880,6 +880,7 @@ struct amdgpu_vm_id {
- struct fence *first;
- struct amdgpu_sync active;
- struct fence *last_flush;
-+ struct amdgpu_ring *last_user;
- atomic_long_t owner;
-
- uint64_t pd_gpu_addr;
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
-index 9444cbe..4a896d7 100644
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
-@@ -267,6 +267,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
- id->pd_gpu_addr = pd_addr;
-
- list_move_tail(&id->list, &adev->vm_manager.ids_lru);
-+ id->last_user = ring;
- atomic_long_set(&id->owner, (long)vm);
- vm->ids[ring->idx] = id;
-
-@@ -314,13 +315,17 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring,
-
- trace_amdgpu_vm_flush(pd_addr, ring->idx, vm_id);
- amdgpu_ring_emit_vm_flush(ring, vm_id, pd_addr);
-- r = amdgpu_fence_emit(ring, &fence);
-- if (r)
-- return r;
-
- mutex_lock(&adev->vm_manager.lock);
-- fence_put(id->last_flush);
-- id->last_flush = fence;
-+ if ((id->pd_gpu_addr == pd_addr) && (id->last_user == ring)) {
-+ r = amdgpu_fence_emit(ring, &fence);
-+ if (r) {
-+ mutex_unlock(&adev->vm_manager.lock);
-+ return r;
-+ }
-+ fence_put(id->last_flush);
-+ id->last_flush = fence;
-+ }
- mutex_unlock(&adev->vm_manager.lock);
- }
-
---
-2.7.4
-