Commit 892bac99 authored by Lijo Lazar's avatar Lijo Lazar Committed by Alex Deucher
Browse files

drm/amdgpu: Prevent hardware access in dpc state



Don't allow hardware access while in dpc state.

Signed-off-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Reviewed-by: default avatarCe Sun <cesun102@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1a0e57eb
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -6256,11 +6256,7 @@ static int amdgpu_device_asic_reset(struct amdgpu_device *adev,

retry:	/* Rest of adevs pre asic reset from XGMI hive. */
	list_for_each_entry(tmp_adev, device_list, reset_list) {
		if (amdgpu_reset_in_dpc(adev))
			tmp_adev->no_hw_access = true;
		r = amdgpu_device_pre_asic_reset(tmp_adev, reset_context);
		if (amdgpu_reset_in_dpc(adev))
			tmp_adev->no_hw_access = false;
		/*TODO Should we stop ?*/
		if (r) {
			dev_err(tmp_adev->dev, "GPU pre asic reset failed with err, %d for drm dev, %s ",
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ static inline void amdgpu_reset_set_dpc_status(struct amdgpu_device *adev,
					       bool status)
{
	adev->pcie_reset_ctx.occurs_dpc = status;
	adev->no_hw_access = status;
}

static inline bool amdgpu_reset_in_dpc(struct amdgpu_device *adev)