From aa06af39291c8a7488e248b18ebeaeae6bf0af23 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 21 Mar 2016 21:20:49 +0100 Subject: [PATCH] drm/amdgpu: fix regression on CIK Fix a copy/paste error introduced by commit feebe91a, which backported a stability fix from gfx_v8, but incorrectly forgot to dereference into the sync_seq array, causing hangs as soon as acceleration was used. The wait can't finish without the correct seq value. Signed-off-by: Grigori Goronzy Cc: stable@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index 06602df..9b1c430 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c @@ -3628,7 +3628,7 @@ static void gfx_v7_0_ring_emit_vm_flush(struct amdgpu_ring *ring, unsigned vm_id, uint64_t pd_addr) { int usepfp = (ring->type == AMDGPU_RING_TYPE_GFX); - uint32_t seq = ring->fence_drv.sync_seq; + uint32_t seq = ring->fence_drv.sync_seq[ring->idx]; uint64_t addr = ring->fence_drv.gpu_addr; amdgpu_ring_write(ring, PACKET3(PACKET3_WAIT_REG_MEM, 5)); -- 1.9.1