diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-09-12 01:37:40 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 13:07:00 -0400 |
commit | 780cffc599b640f1ea1ab051496ad1fed4532150 (patch) | |
tree | da289fdd4be1ad1793c91d6fb2b08a689edc064a /drivers/gpu/drm/amd/amdgpu | |
parent | 86457c3b21cbde1e5df45a8e11e173414e3dfc31 (diff) |
drm/amdgpu: add powerplay support for CI asics
currently, for CI asics,
use dpm by default, amdgpu.dpm=-1.
when set amdgpu.dpm=1, enable powplay.
when set amdgpu.dpm=0, disable both dpm and powerplay.
when powerplay is stable on CI asics, ci_dpm will
be removed.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 5cd5b8ee9744..2d2f0960b025 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |||
@@ -93,8 +93,16 @@ static int amdgpu_pp_early_init(void *handle) | |||
93 | #ifdef CONFIG_DRM_AMDGPU_CIK | 93 | #ifdef CONFIG_DRM_AMDGPU_CIK |
94 | case CHIP_BONAIRE: | 94 | case CHIP_BONAIRE: |
95 | case CHIP_HAWAII: | 95 | case CHIP_HAWAII: |
96 | amd_pp->ip_funcs = &ci_dpm_ip_funcs; | 96 | if (amdgpu_dpm == -1) { |
97 | amd_pp->pp_funcs = &ci_dpm_funcs; | 97 | amd_pp->ip_funcs = &ci_dpm_ip_funcs; |
98 | amd_pp->pp_funcs = &ci_dpm_funcs; | ||
99 | } else { | ||
100 | adev->pp_enabled = true; | ||
101 | if (amdgpu_create_pp_handle(adev)) | ||
102 | return -EINVAL; | ||
103 | amd_pp->ip_funcs = &pp_ip_funcs; | ||
104 | amd_pp->pp_funcs = &pp_dpm_funcs; | ||
105 | } | ||
98 | break; | 106 | break; |
99 | case CHIP_KABINI: | 107 | case CHIP_KABINI: |
100 | case CHIP_MULLINS: | 108 | case CHIP_MULLINS: |