Skip to contentSkip to conversation

drm/amdgpu: fix s3 ring test failed on Vi caused by KIQ enabled.

PATCH In review Rex Zhu 2 participants 2 messages Apr 24, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix s3 ring test failed on Vi caused by KIQ enabled.

commit 2f3ea04dc9258cc can't fix s3 issue completely.

Change-Id I31d0ba7d143b11543bbb83273c022d8e77f34e08
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +2 -3
index 563944a..2ff5f19 100644
@@ -4972,7 +4972,6 @@ static int gfx_v8_0_kiq_init_queue(struct amdgpu_ring *ring)
 		/* reset ring buffer */
 		ring->wptr = 0;
 		amdgpu_ring_clear_ring(ring);
-
 		mutex_lock(&adev->srbm_mutex);
 		vi_srbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
 		gfx_v8_0_kiq_init_register(ring);
@@ -5014,12 +5013,12 @@ 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(*mqd));
-
 		/* reset ring buffer */
 		ring->wptr = 0;
 		amdgpu_ring_clear_ring(ring);
+	} else {
+		amdgpu_ring_clear_ring(ring);
 	}
-
 	return 0;
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by Alex Deucher
#2 lore raw
In reply to a message not in the archive
Quoted 9 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Monday, April 24, 2017 10:07 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amdgpu: fix s3 ring test failed on Vi caused by KIQ enabled.

Quoted 4 lines

commit 2f3ea04dc9258cc can't fix s3 issue completely.

Change-Id I31d0ba7d143b11543bbb83273c022d8e77f34e08
Quoted 35 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -1
index 563944a..2ff5f19 100644
@@ -4972,7 +4972,6 @@ static int gfx_v8_0_kiq_init_queue(struct
 amdgpu_ring *ring)
 		/* reset ring buffer */
 		ring->wptr = 0;
 		amdgpu_ring_clear_ring(ring);
-
 		mutex_lock(&adev->srbm_mutex);
 		vi_srbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +2 -2
 		gfx_v8_0_kiq_init_register(ring);
@@ -5014,12 +5013,12 @@ 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(*mqd));
-
 		/* reset ring buffer */
 		ring->wptr = 0;
 		amdgpu_ring_clear_ring(ring);
+	} else {
+		amdgpu_ring_clear_ring(ring);
 	}
-
 	return 0;

}

Quoted 7 lines

--
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx