aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0692-drm-amdgpu-cleanup-skipping-IB-test-on-KIQ.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0692-drm-amdgpu-cleanup-skipping-IB-test-on-KIQ.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0692-drm-amdgpu-cleanup-skipping-IB-test-on-KIQ.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0692-drm-amdgpu-cleanup-skipping-IB-test-on-KIQ.patch b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0692-drm-amdgpu-cleanup-skipping-IB-test-on-KIQ.patch
new file mode 100644
index 00000000..75437693
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0692-drm-amdgpu-cleanup-skipping-IB-test-on-KIQ.patch
@@ -0,0 +1,80 @@
+From 2e933abb3bd69f6b43b4305a59b369f7ce3262de Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Mon, 29 Oct 2018 14:56:34 +0100
+Subject: [PATCH 0692/2940] drm/amdgpu: cleanup skipping IB test on KIQ
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Instead of hard coding the ring type in the function just never provide
+a test_ib callback.
+
+Additional to that remove the emit_ib callback to make sure the nobody
+ever tries to execute an IB on the KIQ.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 11 +++--------
+ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 --
+ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 --
+ 3 files changed, 3 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+index aaf83fb95ef9..cee624a79448 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+@@ -359,15 +359,10 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
+ struct amdgpu_ring *ring = adev->rings[i];
+ long tmo;
+
+- if (!ring->sched.ready)
+- continue;
+-
+- /* skip IB tests for KIQ in general for the below reasons:
+- * 1. We never submit IBs to the KIQ
+- * 2. KIQ doesn't use the EOP interrupts,
+- * we use some other CP interrupt.
++ /* KIQ rings don't have an IB test because we never submit IBs
++ * to them and they have no interrupt support.
+ */
+- if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
++ if (!ring->sched.ready || !ring->funcs->test_ib)
+ continue;
+
+ /* MM engine need more time */
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+index 9e4aaecd3f23..d2f8637c3205 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+@@ -6987,10 +6987,8 @@ static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_kiq = {
+ 17 + /* gfx_v8_0_ring_emit_vm_flush */
+ 7 + 7 + 7, /* gfx_v8_0_ring_emit_fence_kiq x3 for user fence, vm fence */
+ .emit_ib_size = 4, /* gfx_v8_0_ring_emit_ib_compute */
+- .emit_ib = gfx_v8_0_ring_emit_ib_compute,
+ .emit_fence = gfx_v8_0_ring_emit_fence_kiq,
+ .test_ring = gfx_v8_0_ring_test_ring,
+- .test_ib = gfx_v8_0_ring_test_ib,
+ .insert_nop = amdgpu_ring_insert_nop,
+ .pad_ib = amdgpu_ring_generic_pad_ib,
+ .emit_rreg = gfx_v8_0_ring_emit_rreg,
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+index e0f159062490..bb88e441ad6a 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+@@ -4870,10 +4870,8 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = {
+ 2 + /* gfx_v9_0_ring_emit_vm_flush */
+ 8 + 8 + 8, /* gfx_v9_0_ring_emit_fence_kiq x3 for user fence, vm fence */
+ .emit_ib_size = 4, /* gfx_v9_0_ring_emit_ib_compute */
+- .emit_ib = gfx_v9_0_ring_emit_ib_compute,
+ .emit_fence = gfx_v9_0_ring_emit_fence_kiq,
+ .test_ring = gfx_v9_0_ring_test_ring,
+- .test_ib = gfx_v9_0_ring_test_ib,
+ .insert_nop = amdgpu_ring_insert_nop,
+ .pad_ib = amdgpu_ring_generic_pad_ib,
+ .emit_rreg = gfx_v9_0_ring_emit_rreg,
+--
+2.17.1
+