Commit 91134e80 authored by Lijo Lazar's avatar Lijo Lazar Committed by Alex Deucher
Browse files

drm/amdkfd: Avoid queue reset if disabled



If ring reset is disabled, skip resetting queues. Instead, fall back to
device based reset.

Signed-off-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9888f736
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2339,9 +2339,18 @@ static int reset_hung_queues_sdma(struct device_queue_manager *dqm)

static int reset_queues_on_hws_hang(struct device_queue_manager *dqm, bool is_sdma)
{
	struct amdgpu_device *adev = dqm->dev->adev;

	while (halt_if_hws_hang)
		schedule();

	if (adev->debug_disable_gpu_ring_reset) {
		dev_info_once(adev->dev,
			      "%s queue hung, but ring reset disabled",
			      is_sdma ? "sdma" : "compute");

		return -EPERM;
	}
	if (!amdgpu_gpu_recovery)
		return -ENOTRECOVERABLE;