diff options
author | Kevin Wang <Kevin1.Wang@amd.com> | 2019-01-09 23:33:23 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-03-19 16:03:57 -0400 |
commit | dc8e3a0c8efbaab9b4bc7b924463a56ea33d818c (patch) | |
tree | 12138f94c01d2d6822399803ac03aefc06419fdb /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
parent | dbe6a97024a6eeadf7912383e05118ff98883d2d (diff) |
drm/amd/powerplay: implement is_support_sw_smu function for new smu
add this helper to check new sw-smu support.
Signed-off-by: Kevin Wang <Kevin1.Wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index c124a90e1475..a5ca9c4ccbf5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -712,7 +712,7 @@ static ssize_t amdgpu_get_pp_dpm_sclk(struct device *dev, | |||
712 | struct drm_device *ddev = dev_get_drvdata(dev); | 712 | struct drm_device *ddev = dev_get_drvdata(dev); |
713 | struct amdgpu_device *adev = ddev->dev_private; | 713 | struct amdgpu_device *adev = ddev->dev_private; |
714 | 714 | ||
715 | if (adev->smu.ppt_funcs) | 715 | if (is_support_sw_smu(adev)) |
716 | return smu_print_clk_levels(&adev->smu, PP_SCLK, buf); | 716 | return smu_print_clk_levels(&adev->smu, PP_SCLK, buf); |
717 | else if (adev->powerplay.pp_funcs->print_clock_levels) | 717 | else if (adev->powerplay.pp_funcs->print_clock_levels) |
718 | return amdgpu_dpm_print_clock_levels(adev, PP_SCLK, buf); | 718 | return amdgpu_dpm_print_clock_levels(adev, PP_SCLK, buf); |
@@ -786,7 +786,7 @@ static ssize_t amdgpu_get_pp_dpm_mclk(struct device *dev, | |||
786 | struct drm_device *ddev = dev_get_drvdata(dev); | 786 | struct drm_device *ddev = dev_get_drvdata(dev); |
787 | struct amdgpu_device *adev = ddev->dev_private; | 787 | struct amdgpu_device *adev = ddev->dev_private; |
788 | 788 | ||
789 | if (adev->smu.ppt_funcs) | 789 | if (is_support_sw_smu(adev)) |
790 | return smu_print_clk_levels(&adev->smu, PP_MCLK, buf); | 790 | return smu_print_clk_levels(&adev->smu, PP_MCLK, buf); |
791 | else if (adev->powerplay.pp_funcs->print_clock_levels) | 791 | else if (adev->powerplay.pp_funcs->print_clock_levels) |
792 | return amdgpu_dpm_print_clock_levels(adev, PP_MCLK, buf); | 792 | return amdgpu_dpm_print_clock_levels(adev, PP_MCLK, buf); |