]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/powerplay: correct Arcturus OD support
authorEvan Quan <evan.quan@amd.com>
Thu, 7 Nov 2019 07:33:50 +0000 (15:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 8 Nov 2019 17:30:09 +0000 (12:30 -0500)
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>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

index 66faea66a8e924028bc1b2bf087bfcad39686fc3..1e2da4d37567496bf7e39edeb43923be7405efe2 100644 (file)
@@ -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;
 }