diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index a7adb7b6bd98..c124a90e1475 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "amdgpu_pm.h" | 28 | #include "amdgpu_pm.h" |
29 | #include "amdgpu_dpm.h" | 29 | #include "amdgpu_dpm.h" |
30 | #include "amdgpu_display.h" | 30 | #include "amdgpu_display.h" |
31 | #include "amdgpu_smu.h" | ||
31 | #include "atom.h" | 32 | #include "atom.h" |
32 | #include <linux/power_supply.h> | 33 | #include <linux/power_supply.h> |
33 | #include <linux/hwmon.h> | 34 | #include <linux/hwmon.h> |
@@ -711,7 +712,9 @@ static ssize_t amdgpu_get_pp_dpm_sclk(struct device *dev, | |||
711 | struct drm_device *ddev = dev_get_drvdata(dev); | 712 | struct drm_device *ddev = dev_get_drvdata(dev); |
712 | struct amdgpu_device *adev = ddev->dev_private; | 713 | struct amdgpu_device *adev = ddev->dev_private; |
713 | 714 | ||
714 | if (adev->powerplay.pp_funcs->print_clock_levels) | 715 | if (adev->smu.ppt_funcs) |
716 | return smu_print_clk_levels(&adev->smu, PP_SCLK, buf); | ||
717 | else if (adev->powerplay.pp_funcs->print_clock_levels) | ||
715 | return amdgpu_dpm_print_clock_levels(adev, PP_SCLK, buf); | 718 | return amdgpu_dpm_print_clock_levels(adev, PP_SCLK, buf); |
716 | else | 719 | else |
717 | return snprintf(buf, PAGE_SIZE, "\n"); | 720 | return snprintf(buf, PAGE_SIZE, "\n"); |
@@ -783,7 +786,9 @@ static ssize_t amdgpu_get_pp_dpm_mclk(struct device *dev, | |||
783 | struct drm_device *ddev = dev_get_drvdata(dev); | 786 | struct drm_device *ddev = dev_get_drvdata(dev); |
784 | struct amdgpu_device *adev = ddev->dev_private; | 787 | struct amdgpu_device *adev = ddev->dev_private; |
785 | 788 | ||
786 | if (adev->powerplay.pp_funcs->print_clock_levels) | 789 | if (adev->smu.ppt_funcs) |
790 | return smu_print_clk_levels(&adev->smu, PP_MCLK, buf); | ||
791 | else if (adev->powerplay.pp_funcs->print_clock_levels) | ||
787 | return amdgpu_dpm_print_clock_levels(adev, PP_MCLK, buf); | 792 | return amdgpu_dpm_print_clock_levels(adev, PP_MCLK, buf); |
788 | else | 793 | else |
789 | return snprintf(buf, PAGE_SIZE, "\n"); | 794 | return snprintf(buf, PAGE_SIZE, "\n"); |