AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: IH process reset count when restart
@ 2021-11-13  0:05 Philip Yang
  2021-11-13  0:05 ` [PATCH 2/2] drm/amdgpu: handle IH ring1 overflow Philip Yang
  2021-11-15 13:42 ` [PATCH 1/2] drm/amdgpu: IH process reset count when restart Christian König
  0 siblings, 2 replies; 3+ messages in thread
From: Philip Yang @ 2021-11-13  0:05 UTC (permalink / raw)
  To: amd-gfx; +Cc: ckoenig.leichtzumerken, Felix.Kuehling, Philip Yang

Otherwise when IH process restart, count is zero, the loop will
not exit to wake_up_all after processing AMDGPU_IH_MAX_NUM_IVS
interrupts.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c
index f3d62e196901..0c7963dfacad 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c
@@ -223,7 +223,7 @@ int amdgpu_ih_wait_on_checkpoint_process(struct amdgpu_device *adev,
  */
 int amdgpu_ih_process(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih)
 {
-	unsigned int count = AMDGPU_IH_MAX_NUM_IVS;
+	unsigned int count;
 	u32 wptr;
 
 	if (!ih->enabled || adev->shutdown)
@@ -232,6 +232,7 @@ int amdgpu_ih_process(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih)
 	wptr = amdgpu_ih_get_wptr(adev, ih);
 
 restart_ih:
+	count  = AMDGPU_IH_MAX_NUM_IVS;
 	DRM_DEBUG("%s: rptr %d, wptr %d\n", __func__, ih->rptr, wptr);
 
 	/* Order reading of wptr vs. reading of IH ring data */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-15 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-13  0:05 [PATCH 1/2] drm/amdgpu: IH process reset count when restart Philip Yang
2021-11-13  0:05 ` [PATCH 2/2] drm/amdgpu: handle IH ring1 overflow Philip Yang
2021-11-15 13:42 ` [PATCH 1/2] drm/amdgpu: IH process reset count when restart Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox