summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2019-11-07 15:33:50 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-11-08 12:30:09 -0500
commit875dc7c4ff224afd4e3c61a7b4e06d4600dd8c0a (patch)
treed1a7440ad81f68892c63ed878b200dcc4472180d /drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
parenteebc7f4d7ffa09f2a620bd1e2c67ddd579118af9 (diff)
downloadlinux-stable-875dc7c4ff224afd4e3c61a7b4e06d4600dd8c0a.tar.gz
linux-stable-875dc7c4ff224afd4e3c61a7b4e06d4600dd8c0a.tar.bz2
linux-stable-875dc7c4ff224afd4e3c61a7b4e06d4600dd8c0a.zip
drm/amd/powerplay: correct Arcturus OD support
OD is not supported on Arcturus. Thus the pp_od_clk_voltage sysfs interface is also not supported. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/amdgpu_smu.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/amdgpu_smu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index 66faea66a8e9..1e2da4d37567 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -714,6 +714,9 @@ static int smu_set_funcs(struct amdgpu_device *adev)
{
struct smu_context *smu = &adev->smu;
+ if (adev->pm.pp_feature & PP_OVERDRIVE_MASK)
+ smu->od_enabled = true;
+
switch (adev->asic_type) {
case CHIP_VEGA20:
vega20_set_ppt_funcs(smu);
@@ -725,6 +728,8 @@ static int smu_set_funcs(struct amdgpu_device *adev)
break;
case CHIP_ARCTURUS:
arcturus_set_ppt_funcs(smu);
+ /* OD is not supported on Arcturus */
+ smu->od_enabled =false;
break;
case CHIP_RENOIR:
renoir_set_ppt_funcs(smu);
@@ -733,9 +738,6 @@ static int smu_set_funcs(struct amdgpu_device *adev)
return -EINVAL;
}
- if (adev->pm.pp_feature & PP_OVERDRIVE_MASK)
- smu->od_enabled = true;
-
return 0;
}