Skip to content

Commit 514f4a9

Browse files
PhilipYangAalexdeucher
authored andcommitted
drm/amdgpu: IH process reset count when restart
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 <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 3a50403 commit 514f4a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ int amdgpu_ih_wait_on_checkpoint_process(struct amdgpu_device *adev,
223223
*/
224224
int amdgpu_ih_process(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih)
225225
{
226-
unsigned int count = AMDGPU_IH_MAX_NUM_IVS;
226+
unsigned int count;
227227
u32 wptr;
228228

229229
if (!ih->enabled || adev->shutdown)
@@ -232,6 +232,7 @@ int amdgpu_ih_process(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih)
232232
wptr = amdgpu_ih_get_wptr(adev, ih);
233233

234234
restart_ih:
235+
count = AMDGPU_IH_MAX_NUM_IVS;
235236
DRM_DEBUG("%s: rptr %d, wptr %d\n", __func__, ih->rptr, wptr);
236237

237238
/* Order reading of wptr vs. reading of IH ring data */

0 commit comments

Comments
 (0)