From: Evan Quan Date: Thu, 7 Nov 2019 07:33:50 +0000 (+0800) Subject: drm/amd/powerplay: correct Arcturus OD support X-Git-Tag: baikal/mips/sdk5.9~14853^2~11^2~2 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=e53b57ccb0c40237811f1c6fd5bac855e6290b17;p=kernel.git 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 Reviewed-by: Alex Deucher Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c index 66faea66a8e92..1e2da4d375674 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; }