Skip to content

Commit c92c108

Browse files
superm1alexdeucher
authored andcommitted
Revert "drm/amd/pm: fix the high voltage and temperature issue"
This reverts commit 5f38ac5. This causes issues with rebooting and the 7800XT. Cc: Kenneth Feng <kenneth.feng@amd.com> Cc: stable@vger.kernel.org Fixes: 5f38ac5 ("drm/amd/pm: fix the high voltage and temperature issue") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3062 Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 41bccc9 commit c92c108

5 files changed

Lines changed: 11 additions & 63 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4121,23 +4121,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
41214121
}
41224122
}
41234123
} else {
4124-
switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
4125-
case IP_VERSION(13, 0, 0):
4126-
case IP_VERSION(13, 0, 7):
4127-
case IP_VERSION(13, 0, 10):
4128-
r = psp_gpu_reset(adev);
4129-
break;
4130-
default:
4131-
tmp = amdgpu_reset_method;
4132-
/* It should do a default reset when loading or reloading the driver,
4133-
* regardless of the module parameter reset_method.
4134-
*/
4135-
amdgpu_reset_method = AMD_RESET_METHOD_NONE;
4136-
r = amdgpu_asic_reset(adev);
4137-
amdgpu_reset_method = tmp;
4138-
break;
4139-
}
4140-
4124+
tmp = amdgpu_reset_method;
4125+
/* It should do a default reset when loading or reloading the driver,
4126+
* regardless of the module parameter reset_method.
4127+
*/
4128+
amdgpu_reset_method = AMD_RESET_METHOD_NONE;
4129+
r = amdgpu_asic_reset(adev);
4130+
amdgpu_reset_method = tmp;
41414131
if (r) {
41424132
dev_err(adev->dev, "asic reset on init failed\n");
41434133
goto failed;

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ static int smu_early_init(void *handle)
734734
smu->adev = adev;
735735
smu->pm_enabled = !!amdgpu_dpm;
736736
smu->is_apu = false;
737-
smu->smu_baco.state = SMU_BACO_STATE_NONE;
737+
smu->smu_baco.state = SMU_BACO_STATE_EXIT;
738738
smu->smu_baco.platform_support = false;
739739
smu->user_dpm_profile.fan_mode = -1;
740740

@@ -1954,31 +1954,10 @@ static int smu_smc_hw_cleanup(struct smu_context *smu)
19541954
return 0;
19551955
}
19561956

1957-
static int smu_reset_mp1_state(struct smu_context *smu)
1958-
{
1959-
struct amdgpu_device *adev = smu->adev;
1960-
int ret = 0;
1961-
1962-
if ((!adev->in_runpm) && (!adev->in_suspend) &&
1963-
(!amdgpu_in_reset(adev)))
1964-
switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
1965-
case IP_VERSION(13, 0, 0):
1966-
case IP_VERSION(13, 0, 7):
1967-
case IP_VERSION(13, 0, 10):
1968-
ret = smu_set_mp1_state(smu, PP_MP1_STATE_UNLOAD);
1969-
break;
1970-
default:
1971-
break;
1972-
}
1973-
1974-
return ret;
1975-
}
1976-
19771957
static int smu_hw_fini(void *handle)
19781958
{
19791959
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
19801960
struct smu_context *smu = adev->powerplay.pp_handle;
1981-
int ret;
19821961

19831962
if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev))
19841963
return 0;
@@ -1996,15 +1975,7 @@ static int smu_hw_fini(void *handle)
19961975

19971976
adev->pm.dpm_enabled = false;
19981977

1999-
ret = smu_smc_hw_cleanup(smu);
2000-
if (ret)
2001-
return ret;
2002-
2003-
ret = smu_reset_mp1_state(smu);
2004-
if (ret)
2005-
return ret;
2006-
2007-
return 0;
1978+
return smu_smc_hw_cleanup(smu);
20081979
}
20091980

20101981
static void smu_late_fini(void *handle)

drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ enum smu_reset_mode {
424424
enum smu_baco_state {
425425
SMU_BACO_STATE_ENTER = 0,
426426
SMU_BACO_STATE_EXIT,
427-
SMU_BACO_STATE_NONE,
428427
};
429428

430429
struct smu_baco_context {

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,13 +2748,7 @@ static int smu_v13_0_0_set_mp1_state(struct smu_context *smu,
27482748

27492749
switch (mp1_state) {
27502750
case PP_MP1_STATE_UNLOAD:
2751-
ret = smu_cmn_send_smc_msg_with_param(smu,
2752-
SMU_MSG_PrepareMp1ForUnload,
2753-
0x55, NULL);
2754-
2755-
if (!ret && smu->smu_baco.state == SMU_BACO_STATE_EXIT)
2756-
ret = smu_v13_0_disable_pmfw_state(smu);
2757-
2751+
ret = smu_cmn_set_mp1_state(smu, mp1_state);
27582752
break;
27592753
default:
27602754
/* Ignore others */

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,13 +2505,7 @@ static int smu_v13_0_7_set_mp1_state(struct smu_context *smu,
25052505

25062506
switch (mp1_state) {
25072507
case PP_MP1_STATE_UNLOAD:
2508-
ret = smu_cmn_send_smc_msg_with_param(smu,
2509-
SMU_MSG_PrepareMp1ForUnload,
2510-
0x55, NULL);
2511-
2512-
if (!ret && smu->smu_baco.state == SMU_BACO_STATE_EXIT)
2513-
ret = smu_v13_0_disable_pmfw_state(smu);
2514-
2508+
ret = smu_cmn_set_mp1_state(smu, mp1_state);
25152509
break;
25162510
default:
25172511
/* Ignore others */

0 commit comments

Comments
 (0)