Commit f75a9a5d authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu/soc15: don't abuse IP soft reset for adapter reset



The IP soft reset interface is for per IP reset but it was
being abused for adapter reset on soc15 asics.  Adjust the
interface to make it explicit.

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e7f9ccb4
Loading
Loading
Loading
Loading
+3 −14
Original line number Diff line number Diff line
@@ -493,19 +493,8 @@ failed:
	return ret;
}

static bool psp_check_reset(void* handle)
int psp_gpu_reset(struct amdgpu_device *adev)
{
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;

	if (adev->flags & AMD_IS_APU)
		return true;

	return false;
}

static int psp_reset(void* handle)
{
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
	return psp_mode1_reset(&adev->psp);
}

@@ -552,9 +541,9 @@ const struct amd_ip_funcs psp_ip_funcs = {
	.suspend = psp_suspend,
	.resume = psp_resume,
	.is_idle = NULL,
	.check_soft_reset = psp_check_reset,
	.check_soft_reset = NULL,
	.wait_for_idle = NULL,
	.soft_reset = psp_reset,
	.soft_reset = NULL,
	.set_clockgating_state = psp_set_clockgating_state,
	.set_powergating_state = psp_set_powergating_state,
};
+2 −0
Original line number Diff line number Diff line
@@ -158,4 +158,6 @@ extern int psp_wait_for(struct psp_context *psp, uint32_t reg_index,

extern const struct amdgpu_ip_block_version psp_v10_0_ip_block;

int psp_gpu_reset(struct amdgpu_device *adev);

#endif
+1 −6
Original line number Diff line number Diff line
@@ -417,12 +417,7 @@ static int soc15_asic_reset(struct amdgpu_device *adev)

	pci_save_state(adev->pdev);

	for (i = 0; i < AMDGPU_MAX_IP_NUM; i++) {
		if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP){
			adev->ip_blocks[i].version->funcs->soft_reset((void *)adev);
			break;
		}
	}
	psp_gpu_reset(adev);

	pci_restore_state(adev->pdev);