Commit 1a11a65d authored by YiPeng Chai's avatar YiPeng Chai Committed by Alex Deucher
Browse files

drm/amdgpu: Enable mode-1 reset for RAS recovery in fatal error mode



The patch is enabling mode-1 reset for RAS recovery in fatal error mode.

Signed-off-by: default avatarYiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarTao Zhou <tao.zhou1@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 64a3dbb0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4593,6 +4593,10 @@ bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev)
	if (amdgpu_gpu_recovery == 0)
		goto disabled;

	/* Skip soft reset check in fatal error mode */
	if (!amdgpu_ras_is_poison_mode_supported(adev))
		return true;

	if (!amdgpu_device_ip_check_soft_reset(adev)) {
		dev_info(adev->dev,"Timeout, but no hardware hang detected.\n");
		return false;
+6 −1
Original line number Diff line number Diff line
@@ -1948,6 +1948,11 @@ static void amdgpu_ras_do_recovery(struct work_struct *work)

		reset_context.method = AMD_RESET_METHOD_NONE;
		reset_context.reset_req_dev = adev;

		/* Perform full reset in fatal error mode */
		if (!amdgpu_ras_is_poison_mode_supported(ras->adev))
			set_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
		else
			clear_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);

		amdgpu_device_gpu_recover(ras->adev, NULL, &reset_context);