From: Alex Deucher Date: Thu, 23 Mar 2017 05:38:11 +0000 (-0400) Subject: drm/amdgpu/gfx8: test KIQ before compute rings X-Git-Tag: v5.15~11398^2~23^2~167 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=2e263c824a5dfc3adcadac0ac1aed762605f0538;p=mirror_ubuntu-kernels.git drm/amdgpu/gfx8: test KIQ before compute rings If KIQ isn't working, the compute rings won't work either. Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index bad28d8a42fb..111fa5d91bdf 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -4980,6 +4980,13 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev) if (r) goto done; + ring->ready = true; + r = amdgpu_ring_test_ring(ring); + if (r) { + ring->ready = false; + goto done; + } + for (i = 0; i < adev->gfx.num_compute_rings; i++) { ring = &adev->gfx.compute_ring[i]; @@ -5008,12 +5015,6 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev) ring->ready = false; } - ring = &adev->gfx.kiq.ring; - ring->ready = true; - r = amdgpu_ring_test_ring(ring); - if (r) - ring->ready = false; - done: return r; }