diff options
Diffstat (limited to 'meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0445-drm-amdgpu-remove-amdgpu_fence_wait.patch')
-rw-r--r-- | meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0445-drm-amdgpu-remove-amdgpu_fence_wait.patch | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0445-drm-amdgpu-remove-amdgpu_fence_wait.patch b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0445-drm-amdgpu-remove-amdgpu_fence_wait.patch new file mode 100644 index 00000000..fe7ed9da --- /dev/null +++ b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0445-drm-amdgpu-remove-amdgpu_fence_wait.patch @@ -0,0 +1,148 @@ +From 02bc0650bc930105346773253e5bf33c2917c601 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com> +Date: Fri, 7 Aug 2015 13:53:36 +0200 +Subject: [PATCH 0445/1050] drm/amdgpu: remove amdgpu_fence_wait +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It was just a wrapper for fence_wait anyway. + +Signed-off-by: Christian König <christian.koenig@amd.com> +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - + drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 2 +- + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- + drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 22 ---------------------- + drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 6 +++--- + drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 4 ++-- + 6 files changed, 7 insertions(+), 30 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h +index abf1650..7a3a00f 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h +@@ -439,7 +439,6 @@ int amdgpu_fence_wait_next(struct amdgpu_ring *ring); + int amdgpu_fence_wait_empty(struct amdgpu_ring *ring); + unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring); + +-int amdgpu_fence_wait(struct amdgpu_fence *fence, bool interruptible); + signed long amdgpu_fence_wait_any(struct amdgpu_device *adev, + struct amdgpu_fence **fences, + bool intr, long t); +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c +index 2742b9a..759482e 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c +@@ -42,7 +42,7 @@ static int amdgpu_benchmark_do_move(struct amdgpu_device *adev, unsigned size, + r = amdgpu_copy_buffer(ring, saddr, daddr, size, NULL, &fence); + if (r) + goto exit_do_move; +- r = amdgpu_fence_wait(fence, false); ++ r = fence_wait(&fence->base, false); + if (r) + goto exit_do_move; + amdgpu_fence_unref(&fence); +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +index b16b925..e12931e 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +@@ -52,7 +52,7 @@ static void amdgpu_flip_work_func(struct work_struct *__work) + if (work->fence) { + fence = to_amdgpu_fence(work->fence); + if (fence) { +- r = amdgpu_fence_wait(fence, false); ++ r = fence_wait(&fence->base, false); + if (r == -EDEADLK) { + up_read(&adev->exclusive_lock); + r = amdgpu_gpu_reset(adev); +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +index 5a2a15c..1097259 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +@@ -497,28 +497,6 @@ static long amdgpu_fence_ring_wait_seq_timeout(struct amdgpu_ring *ring, uint64_ + } + } + +- +-/** +- * amdgpu_fence_wait - wait for a fence to signal +- * +- * @fence: amdgpu fence object +- * @intr: use interruptable sleep +- * +- * Wait for the requested fence to signal (all asics). +- * @intr selects whether to use interruptable (true) or non-interruptable +- * (false) sleep when waiting for the fence. +- * Returns 0 if the fence has passed, error for all other cases. +- */ +-int amdgpu_fence_wait(struct amdgpu_fence *fence, bool intr) +-{ +- long r; +- +- r = fence_wait_timeout(&fence->base, intr, MAX_SCHEDULE_TIMEOUT); +- if (r < 0) +- return r; +- return 0; +-} +- + /** + * amdgpu_fence_wait_next - wait for the next fence to signal + * +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +index 2c42f50..7cb711f 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +@@ -180,7 +180,7 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync, + + if (amdgpu_enable_scheduler || (count >= AMDGPU_NUM_SYNCS)) { + /* not enough room, wait manually */ +- r = amdgpu_fence_wait(fence, false); ++ r = fence_wait(&fence->base, false); + if (r) + return r; + continue; +@@ -200,7 +200,7 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync, + if (!amdgpu_semaphore_emit_signal(other, semaphore)) { + /* signaling wasn't successful wait manually */ + amdgpu_ring_undo(other); +- r = amdgpu_fence_wait(fence, false); ++ r = fence_wait(&fence->base, false); + if (r) + return r; + continue; +@@ -210,7 +210,7 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync, + if (!amdgpu_semaphore_emit_wait(ring, semaphore)) { + /* waiting wasn't successful wait manually */ + amdgpu_ring_undo(other); +- r = amdgpu_fence_wait(fence, false); ++ r = fence_wait(&fence->base, false); + if (r) + return r; + continue; +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c +index afb57de..962dd55 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c +@@ -116,7 +116,7 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev) + goto out_lclean_unpin; + } + +- r = amdgpu_fence_wait(fence, false); ++ r = fence_wait(&fence->base, false); + if (r) { + DRM_ERROR("Failed to wait for GTT->VRAM fence %d\n", i); + goto out_lclean_unpin; +@@ -161,7 +161,7 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev) + goto out_lclean_unpin; + } + +- r = amdgpu_fence_wait(fence, false); ++ r = fence_wait(&fence->base, false); + if (r) { + DRM_ERROR("Failed to wait for VRAM->GTT fence %d\n", i); + goto out_lclean_unpin; +-- +1.9.1 + |