summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
diff options
context:
space:
mode:
authorKevin Wang <Kevin1.Wang@amd.com>2019-01-10 12:33:23 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-03-19 15:03:57 -0500
commitdc8e3a0c8efbaab9b4bc7b924463a56ea33d818c (patch)
tree12138f94c01d2d6822399803ac03aefc06419fdb /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
parentdbe6a97024a6eeadf7912383e05118ff98883d2d (diff)
downloadlinux-stable-dc8e3a0c8efbaab9b4bc7b924463a56ea33d818c.tar.gz
linux-stable-dc8e3a0c8efbaab9b4bc7b924463a56ea33d818c.tar.bz2
linux-stable-dc8e3a0c8efbaab9b4bc7b924463a56ea33d818c.zip
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.c4
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,
struct drm_device *ddev = dev_get_drvdata(dev);
struct amdgpu_device *adev = ddev->dev_private;
- if (adev->smu.ppt_funcs)
+ if (is_support_sw_smu(adev))
return smu_print_clk_levels(&adev->smu, PP_SCLK, buf);
else if (adev->powerplay.pp_funcs->print_clock_levels)
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,
struct drm_device *ddev = dev_get_drvdata(dev);
struct amdgpu_device *adev = ddev->dev_private;
- if (adev->smu.ppt_funcs)
+ if (is_support_sw_smu(adev))
return smu_print_clk_levels(&adev->smu, PP_MCLK, buf);
else if (adev->powerplay.pp_funcs->print_clock_levels)
return amdgpu_dpm_print_clock_levels(adev, PP_MCLK, buf);