Skip to content

Commit 42cdf6f

Browse files
committed
drm/amdgpu/gfx8: always restore kcq MQDs
Always restore the MQD not just when we do a reset. This allows us to move the MQD to VRAM if we want. v2: always reset ring pointer as well (Christian) Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent b848fe6 commit 42cdf6f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4651,15 +4651,13 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)
46514651

46524652
if (adev->gfx.mec.mqd_backup[mqd_idx])
46534653
memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(struct vi_mqd_allocation));
4654-
} else if (amdgpu_in_reset(adev)) { /* for GPU_RESET case */
4655-
/* reset MQD to a clean status */
4654+
} else {
4655+
/* restore MQD to a clean status */
46564656
if (adev->gfx.mec.mqd_backup[mqd_idx])
46574657
memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation));
46584658
/* reset ring buffer */
46594659
ring->wptr = 0;
46604660
amdgpu_ring_clear_ring(ring);
4661-
} else {
4662-
amdgpu_ring_clear_ring(ring);
46634661
}
46644662
return 0;
46654663
}

0 commit comments

Comments
 (0)