[PATCH] drm/amdgpu/gfx8: Fix compute ring failure after resetting
Yu, Xiangliang
Xiangliang.Yu at amd.com
Fri Nov 10 08:57:33 UTC 2017
> The ring clear is already before "ring test", you patch just postpone the ring
> clear to an even later point, Do you know the root cause of your fix ?
Yes, just postpone it. Still can't find the root cause and the issue only happen on gfx8.
I'm ok if you can find better solution.
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Xiangliang.Yu
> Sent: 2017年11月10日 14:52
> To: amd-gfx at lists.freedesktop.org
> Cc: Yu, Xiangliang <Xiangliang.Yu at amd.com>
> Subject: [PATCH] drm/amdgpu/gfx8: Fix compute ring failure after resetting
>
> Do ring clear before ring test, otherwise compute ring test will fail after gpu
> resetting.
>
> Signed-off-by: Xiangliang.Yu <Xiangliang.Yu at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 +++++---
> 1 file changed, 5 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 a74515a..a982919 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -4868,9 +4868,6 @@ 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(struct vi_mqd_allocation));
> - /* reset ring buffer */
> - ring->wptr = 0;
> - amdgpu_ring_clear_ring(ring);
> } else {
> amdgpu_ring_clear_ring(ring);
> }
> @@ -4945,6 +4942,11 @@ static int gfx_v8_0_kiq_resume(struct
> amdgpu_device *adev)
> /* Test KCQs */
> for (i = 0; i < adev->gfx.num_compute_rings; i++) {
> ring = &adev->gfx.compute_ring[i];
> + if (adev->in_gpu_reset) {
> + /* reset ring buffer */
> + ring->wptr = 0;
> + amdgpu_ring_clear_ring(ring);
> + }
> ring->ready = true;
> r = amdgpu_ring_test_ring(ring);
> if (r)
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list