diff options
author | Likun Gao <Likun.Gao@amd.com> | 2019-01-31 01:11:04 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-03-19 16:04:02 -0400 |
commit | 3b94fb101f4071da2b555632d8d68a353a9dde79 (patch) | |
tree | 5d678dcc34bc745ae84419a0586220172c673954 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
parent | a8394cfa42335f0d634be5715bcca51caa178f6a (diff) |
drm/amd/powerplay: add limit of pp_feature for smu (v3)
Move pp_feature from the struct of amd_powerplay to amdgpu_device.
Add pp_feature limit for overdrive interface.
v2: put pp_feature into struct amdgpu_pm.
v3: merge feature_mask with pp_feature.
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Suggested-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Huang Rui <ray.huang@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 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index e05108ed1a2b..88362019d1dd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -2569,7 +2569,8 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) | |||
2569 | "pp_power_profile_mode\n"); | 2569 | "pp_power_profile_mode\n"); |
2570 | return ret; | 2570 | return ret; |
2571 | } | 2571 | } |
2572 | if (is_support_sw_smu(adev) || hwmgr->od_enabled) { | 2572 | if ((is_support_sw_smu(adev) && adev->smu.od_enabled) || |
2573 | (!is_support_sw_smu(adev) && hwmgr->od_enabled)) { | ||
2573 | ret = device_create_file(adev->dev, | 2574 | ret = device_create_file(adev->dev, |
2574 | &dev_attr_pp_od_clk_voltage); | 2575 | &dev_attr_pp_od_clk_voltage); |
2575 | if (ret) { | 2576 | if (ret) { |
@@ -2645,7 +2646,8 @@ void amdgpu_pm_sysfs_fini(struct amdgpu_device *adev) | |||
2645 | device_remove_file(adev->dev, &dev_attr_pp_mclk_od); | 2646 | device_remove_file(adev->dev, &dev_attr_pp_mclk_od); |
2646 | device_remove_file(adev->dev, | 2647 | device_remove_file(adev->dev, |
2647 | &dev_attr_pp_power_profile_mode); | 2648 | &dev_attr_pp_power_profile_mode); |
2648 | if (hwmgr->od_enabled) | 2649 | if ((is_support_sw_smu(adev) && adev->smu.od_enabled) || |
2650 | (!is_support_sw_smu(adev) && hwmgr->od_enabled)) | ||
2649 | device_remove_file(adev->dev, | 2651 | device_remove_file(adev->dev, |
2650 | &dev_attr_pp_od_clk_voltage); | 2652 | &dev_attr_pp_od_clk_voltage); |
2651 | device_remove_file(adev->dev, &dev_attr_gpu_busy_percent); | 2653 | device_remove_file(adev->dev, &dev_attr_gpu_busy_percent); |