]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/amdgpu: fix regression on CIK (v2)
authorGrigori Goronzy <greg@chown.ath.cx>
Tue, 22 Mar 2016 19:48:18 +0000 (15:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 May 2016 21:48:46 +0000 (14:48 -0700)
This fix was written against drm-next, but when it was
backported to 4.5 as a stable fix, the driver internal
structure change was missed.  Fix that up here to avoid
a hang due to waiting for the wrong sequence number.

v2: agd: fix up commit message

Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c

index aa491540ba85bebbcf70c1d4d1be4b088026b9c9..94630076460912123f946339c1cafe843df49413 100644 (file)
@@ -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));