From 94c9ceade9a6cf3f85f2c316abd02ce3c5abc800 Mon Sep 17 00:00:00 2001 From: Rex Zhu Date: Mon, 24 Apr 2017 22:00:09 +0800 Subject: [PATCH] drm/amdgpu: fix s3 ring test failed on Vi caused by KIQ enabled. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 390e42fbc692..8da7ecc8a8c8 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -4981,7 +4981,6 @@ static int gfx_v8_0_kiq_init_queue(struct amdgpu_ring *ring) /* reset ring buffer */ ring->wptr = 0; amdgpu_ring_clear_ring(ring); - mutex_lock(&adev->srbm_mutex); vi_srbm_select(adev, ring->me, ring->pipe, ring->queue, 0); gfx_v8_0_kiq_init_register(ring); @@ -5023,12 +5022,12 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring) /* reset MQD to a clean status */ if (adev->gfx.mec.mqd_backup[mqd_idx]) memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(*mqd)); - /* reset ring buffer */ ring->wptr = 0; amdgpu_ring_clear_ring(ring); + } else { + amdgpu_ring_clear_ring(ring); } - return 0; } -- 2.30.2