diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-04-24 22:00:09 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-04-25 11:54:05 -0400 |
commit | b03fbfed692b33cd0a6042140981c7811c614193 (patch) | |
tree | 8ee66157ecd966a01746ab1866ae5cebcbac7dd6 | |
parent | 4a13949934ebb5ca126eb607b629e68d279b8457 (diff) |
drm/amdgpu: fix s3 ring test failed on Vi caused by KIQ enabled.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 |
1 files 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 e3c489381a0e..ebda322cfb51 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -4969,7 +4969,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); @@ -5011,12 +5010,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; } |