Skip to content

Commit cc476c6

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu/sdma: handle paging queues in amdgpu_sdma_reset_engine()
[ Upstream commit 9a9e87d ] Need to properly start and stop paging queues if they are present. This is not an issue today since we don't support a paging queue on any chips with queue reset. Fixes: b22659d ("drm/amdgpu: switch amdgpu_sdma_reset_engine to use the new sdma function pointers") Reviewed-by: Jesse Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 11e4bfe commit cc476c6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,11 @@ int amdgpu_sdma_reset_engine(struct amdgpu_device *adev, uint32_t instance_id)
597597
page_sched_stopped = true;
598598
}
599599

600-
if (sdma_instance->funcs->stop_kernel_queue)
600+
if (sdma_instance->funcs->stop_kernel_queue) {
601601
sdma_instance->funcs->stop_kernel_queue(gfx_ring);
602+
if (adev->sdma.has_page_queue)
603+
sdma_instance->funcs->stop_kernel_queue(page_ring);
604+
}
602605

603606
/* Perform the SDMA reset for the specified instance */
604607
ret = amdgpu_sdma_soft_reset(adev, instance_id);
@@ -607,8 +610,11 @@ int amdgpu_sdma_reset_engine(struct amdgpu_device *adev, uint32_t instance_id)
607610
goto exit;
608611
}
609612

610-
if (sdma_instance->funcs->start_kernel_queue)
613+
if (sdma_instance->funcs->start_kernel_queue) {
611614
sdma_instance->funcs->start_kernel_queue(gfx_ring);
615+
if (adev->sdma.has_page_queue)
616+
sdma_instance->funcs->start_kernel_queue(page_ring);
617+
}
612618

613619
exit:
614620
/* Restart the scheduler's work queue for the GFX and page rings

0 commit comments

Comments
 (0)