aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0651-drm-amdgpu-use-the-new-fence_is_later.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0651-drm-amdgpu-use-the-new-fence_is_later.patch')
-rw-r--r--common/recipes-kernel/linux/files/0651-drm-amdgpu-use-the-new-fence_is_later.patch78
1 files changed, 0 insertions, 78 deletions
diff --git a/common/recipes-kernel/linux/files/0651-drm-amdgpu-use-the-new-fence_is_later.patch b/common/recipes-kernel/linux/files/0651-drm-amdgpu-use-the-new-fence_is_later.patch
deleted file mode 100644
index 88bb90b3..00000000
--- a/common/recipes-kernel/linux/files/0651-drm-amdgpu-use-the-new-fence_is_later.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 24233860b97c46eb943215d761e03f6f2e1285a6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
-Date: Thu, 22 Oct 2015 10:53:16 +0200
-Subject: [PATCH 0651/1565] drm/amdgpu: use the new fence_is_later
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Instead of coding the check ourself.
-
-Signed-off-by: Christian König <christian.koenig@amd.com>
-Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
----
- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 30 +++++++++++++-----------------
- 1 file changed, 13 insertions(+), 17 deletions(-)
-
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
-index 4921de1..0499d2b 100644
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
-@@ -87,6 +87,15 @@ static bool amdgpu_sync_test_owner(struct fence *f, void *owner)
- return false;
- }
-
-+static void amdgpu_sync_keep_later(struct fence **keep, struct fence *fence)
-+{
-+ if (*keep && fence_is_later(*keep, fence))
-+ return;
-+
-+ fence_put(*keep);
-+ *keep = fence_get(fence);
-+}
-+
- /**
- * amdgpu_sync_fence - remember to sync to this fence
- *
-@@ -100,34 +109,21 @@ int amdgpu_sync_fence(struct amdgpu_device *adev, struct amdgpu_sync *sync,
- struct amdgpu_sync_entry *e;
- struct amdgpu_fence *fence;
- struct amdgpu_fence *other;
-- struct fence *tmp, *later;
-
- if (!f)
- return 0;
-
- if (amdgpu_sync_same_dev(adev, f) &&
-- amdgpu_sync_test_owner(f, AMDGPU_FENCE_OWNER_VM)) {
-- if (sync->last_vm_update) {
-- tmp = sync->last_vm_update;
-- BUG_ON(f->context != tmp->context);
-- later = (f->seqno - tmp->seqno <= INT_MAX) ? f : tmp;
-- sync->last_vm_update = fence_get(later);
-- fence_put(tmp);
-- } else
-- sync->last_vm_update = fence_get(f);
-- }
-+ amdgpu_sync_test_owner(f, AMDGPU_FENCE_OWNER_VM))
-+ amdgpu_sync_keep_later(&sync->last_vm_update, f);
-
- fence = to_amdgpu_fence(f);
- if (!fence || fence->ring->adev != adev) {
- hash_for_each_possible(sync->fences, e, node, f->context) {
-- struct fence *new;
- if (unlikely(e->fence->context != f->context))
- continue;
-- new = fence_get(fence_later(e->fence, f));
-- if (new) {
-- fence_put(e->fence);
-- e->fence = new;
-- }
-+
-+ amdgpu_sync_keep_later(&e->fence, f);
- return 0;
- }
-
---
-1.9.1
-