diff options
| author | Mark Brown <broonie@kernel.org> | 2023-05-24 11:02:23 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2023-05-24 11:02:23 +0100 |
| commit | 01bc4ac9da94f972aabc33fc658609e2732a26e2 (patch) | |
| tree | 9798dc547ba536d964261e9bead6ba6aecfd0cfc /drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | |
| parent | 8ce1bb9a5935385e9ef65bda1e8ca923c7fbb887 (diff) | |
| parent | 44c026a73be8038f03dbdeef028b642880cf1511 (diff) | |
spi: Merge up v6.4-rc3
Merge up v6.4-rc3 in order to get fixes to improve the stability of my
CI.
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c')
| -rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index 5633c5797e85..2ddf5198e5c4 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -733,6 +733,24 @@ static int smu_late_init(void *handle) return ret; } + /* + * Explicitly notify PMFW the power mode the system in. Since + * the PMFW may boot the ASIC with a different mode. + * For those supporting ACDC switch via gpio, PMFW will + * handle the switch automatically. Driver involvement + * is unnecessary. + */ + if (!smu->dc_controlled_by_gpio) { + ret = smu_set_power_source(smu, + adev->pm.ac_power ? SMU_POWER_SOURCE_AC : + SMU_POWER_SOURCE_DC); + if (ret) { + dev_err(adev->dev, "Failed to switch to %s mode!\n", + adev->pm.ac_power ? "AC" : "DC"); + return ret; + } + } + if ((adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 1)) || (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 3))) return 0; |
