From: HaiJun Chang Date: Tue, 29 Oct 2019 07:44:08 +0000 (+0800) Subject: drm/amdgpu: fix gfx VF FLR test fail on navi X-Git-Tag: v5.10.7~3692^2~29^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=897110eed5084bb91731fd4e2bdcf5f536eaadfd;p=platform%2Fkernel%2Flinux-rpi.git drm/amdgpu: fix gfx VF FLR test fail on navi Cp wptr in wb buffer is outdated after VF FLR. The outdated wptr may cause cp to execute unexpected packets. Reset cp wptr in wb buffer. Signed-off-by: HaiJun Chang Acked-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index 959f5be..e7bab4f 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c @@ -3106,6 +3106,7 @@ static int gfx_v10_0_gfx_init_queue(struct amdgpu_ring *ring) memcpy(mqd, adev->gfx.me.mqd_backup[AMDGPU_MAX_GFX_RINGS], sizeof(*mqd)); /* reset the ring */ ring->wptr = 0; + adev->wb.wb[ring->wptr_offs] = 0; amdgpu_ring_clear_ring(ring); #ifdef BRING_UP_DEBUG mutex_lock(&adev->srbm_mutex);