Commit c92c1084 authored by Mario Limonciello's avatar Mario Limonciello Committed by Alex Deucher

Revert "drm/amd/pm: fix the high voltage and temperature issue"

This reverts commit 5f38ac54.
This causes issues with rebooting and the 7800XT.

Cc: Kenneth Feng <kenneth.feng@amd.com>
Cc: stable@vger.kernel.org
Fixes: 5f38ac54 ("drm/amd/pm: fix the high voltage and temperature issue")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3062Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 41bccc98
...@@ -4121,23 +4121,13 @@ int amdgpu_device_init(struct amdgpu_device *adev, ...@@ -4121,23 +4121,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
} }
} }
} else { } else {
switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) { tmp = amdgpu_reset_method;
case IP_VERSION(13, 0, 0): /* It should do a default reset when loading or reloading the driver,
case IP_VERSION(13, 0, 7): * regardless of the module parameter reset_method.
case IP_VERSION(13, 0, 10): */
r = psp_gpu_reset(adev); amdgpu_reset_method = AMD_RESET_METHOD_NONE;
break; r = amdgpu_asic_reset(adev);
default: amdgpu_reset_method = tmp;
tmp = amdgpu_reset_method;
/* It should do a default reset when loading or reloading the driver,
* regardless of the module parameter reset_method.
*/
amdgpu_reset_method = AMD_RESET_METHOD_NONE;
r = amdgpu_asic_reset(adev);
amdgpu_reset_method = tmp;
break;
}
if (r) { if (r) {
dev_err(adev->dev, "asic reset on init failed\n"); dev_err(adev->dev, "asic reset on init failed\n");
goto failed; goto failed;
......
...@@ -734,7 +734,7 @@ static int smu_early_init(void *handle) ...@@ -734,7 +734,7 @@ static int smu_early_init(void *handle)
smu->adev = adev; smu->adev = adev;
smu->pm_enabled = !!amdgpu_dpm; smu->pm_enabled = !!amdgpu_dpm;
smu->is_apu = false; smu->is_apu = false;
smu->smu_baco.state = SMU_BACO_STATE_NONE; smu->smu_baco.state = SMU_BACO_STATE_EXIT;
smu->smu_baco.platform_support = false; smu->smu_baco.platform_support = false;
smu->user_dpm_profile.fan_mode = -1; smu->user_dpm_profile.fan_mode = -1;
...@@ -1954,31 +1954,10 @@ static int smu_smc_hw_cleanup(struct smu_context *smu) ...@@ -1954,31 +1954,10 @@ static int smu_smc_hw_cleanup(struct smu_context *smu)
return 0; return 0;
} }
static int smu_reset_mp1_state(struct smu_context *smu)
{
struct amdgpu_device *adev = smu->adev;
int ret = 0;
if ((!adev->in_runpm) && (!adev->in_suspend) &&
(!amdgpu_in_reset(adev)))
switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
case IP_VERSION(13, 0, 0):
case IP_VERSION(13, 0, 7):
case IP_VERSION(13, 0, 10):
ret = smu_set_mp1_state(smu, PP_MP1_STATE_UNLOAD);
break;
default:
break;
}
return ret;
}
static int smu_hw_fini(void *handle) static int smu_hw_fini(void *handle)
{ {
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct smu_context *smu = adev->powerplay.pp_handle; struct smu_context *smu = adev->powerplay.pp_handle;
int ret;
if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev)) if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev))
return 0; return 0;
...@@ -1996,15 +1975,7 @@ static int smu_hw_fini(void *handle) ...@@ -1996,15 +1975,7 @@ static int smu_hw_fini(void *handle)
adev->pm.dpm_enabled = false; adev->pm.dpm_enabled = false;
ret = smu_smc_hw_cleanup(smu); return smu_smc_hw_cleanup(smu);
if (ret)
return ret;
ret = smu_reset_mp1_state(smu);
if (ret)
return ret;
return 0;
} }
static void smu_late_fini(void *handle) static void smu_late_fini(void *handle)
......
...@@ -424,7 +424,6 @@ enum smu_reset_mode { ...@@ -424,7 +424,6 @@ enum smu_reset_mode {
enum smu_baco_state { enum smu_baco_state {
SMU_BACO_STATE_ENTER = 0, SMU_BACO_STATE_ENTER = 0,
SMU_BACO_STATE_EXIT, SMU_BACO_STATE_EXIT,
SMU_BACO_STATE_NONE,
}; };
struct smu_baco_context { struct smu_baco_context {
......
...@@ -2748,13 +2748,7 @@ static int smu_v13_0_0_set_mp1_state(struct smu_context *smu, ...@@ -2748,13 +2748,7 @@ static int smu_v13_0_0_set_mp1_state(struct smu_context *smu,
switch (mp1_state) { switch (mp1_state) {
case PP_MP1_STATE_UNLOAD: case PP_MP1_STATE_UNLOAD:
ret = smu_cmn_send_smc_msg_with_param(smu, ret = smu_cmn_set_mp1_state(smu, mp1_state);
SMU_MSG_PrepareMp1ForUnload,
0x55, NULL);
if (!ret && smu->smu_baco.state == SMU_BACO_STATE_EXIT)
ret = smu_v13_0_disable_pmfw_state(smu);
break; break;
default: default:
/* Ignore others */ /* Ignore others */
......
...@@ -2505,13 +2505,7 @@ static int smu_v13_0_7_set_mp1_state(struct smu_context *smu, ...@@ -2505,13 +2505,7 @@ static int smu_v13_0_7_set_mp1_state(struct smu_context *smu,
switch (mp1_state) { switch (mp1_state) {
case PP_MP1_STATE_UNLOAD: case PP_MP1_STATE_UNLOAD:
ret = smu_cmn_send_smc_msg_with_param(smu, ret = smu_cmn_set_mp1_state(smu, mp1_state);
SMU_MSG_PrepareMp1ForUnload,
0x55, NULL);
if (!ret && smu->smu_baco.state == SMU_BACO_STATE_EXIT)
ret = smu_v13_0_disable_pmfw_state(smu);
break; break;
default: default:
/* Ignore others */ /* Ignore others */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment