aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0691-drm-amdgpu-cleanup-amdgpu_ib_ring_tests.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0691-drm-amdgpu-cleanup-amdgpu_ib_ring_tests.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0691-drm-amdgpu-cleanup-amdgpu_ib_ring_tests.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0691-drm-amdgpu-cleanup-amdgpu_ib_ring_tests.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0691-drm-amdgpu-cleanup-amdgpu_ib_ring_tests.patch
new file mode 100644
index 00000000..2986f872
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0691-drm-amdgpu-cleanup-amdgpu_ib_ring_tests.patch
@@ -0,0 +1,78 @@
+From b9e7df8ccc958702b984334bdfae010fb972ff3c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Mon, 29 Oct 2018 10:55:23 +0100
+Subject: [PATCH 0691/2940] drm/amdgpu: cleanup amdgpu_ib_ring_tests
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Test only initialized rings, use the ring name instead of the index in the
+error message and note on which device the error occured.
+
+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 | 35 ++++++++++++++------------
+ 1 file changed, 19 insertions(+), 16 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+index b94065d663d8..aaf83fb95ef9 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+@@ -355,11 +355,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
+ tmo_gfx = 8 * AMDGPU_IB_TEST_TIMEOUT;
+ }
+
+- for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
++ for (i = 0; i < adev->num_rings; ++i) {
+ struct amdgpu_ring *ring = adev->rings[i];
+ long tmo;
+
+- if (!ring || !ring->sched.ready)
++ if (!ring->sched.ready)
+ continue;
+
+ /* skip IB tests for KIQ in general for the below reasons:
+@@ -382,20 +382,23 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
+ tmo = tmo_gfx;
+
+ r = amdgpu_ring_test_ib(ring, tmo);
+- if (r) {
+- ring->sched.ready = false;
+-
+- if (ring == &adev->gfx.gfx_ring[0]) {
+- /* oh, oh, that's really bad */
+- DRM_ERROR("amdgpu: failed testing IB on GFX ring (%d).\n", r);
+- adev->accel_working = false;
+- return r;
+-
+- } else {
+- /* still not good, but we can live with it */
+- DRM_ERROR("amdgpu: failed testing IB on ring %d (%d).\n", i, r);
+- ret = r;
+- }
++ if (!r) {
++ DRM_DEV_DEBUG(adev->dev, "ib test on %s succeeded\n",
++ ring->name);
++ continue;
++ }
++
++ ring->sched.ready = false;
++ DRM_DEV_ERROR(adev->dev, "IB test failed on %s (%d).\n",
++ ring->name, r);
++
++ if (ring == &adev->gfx.gfx_ring[0]) {
++ /* oh, oh, that's really bad */
++ adev->accel_working = false;
++ return r;
++
++ } else {
++ ret = r;
+ }
+ }
+ return ret;
+--
+2.17.1
+