aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorEric Huang <JinHuiEric.Huang@amd.com>2016-06-07 17:01:27 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-07-07 14:51:32 -0400
commit840dd4c60526e90b298e1ee019ffcdd25a90b780 (patch)
treee28843cc1141c43190142c39826e049a48a9fd69 /drivers/gpu
parenta8bd3e1c71c342782b6597ac6bf4680d1f13254d (diff)
drm/amd/powerplay: set UVD clocks bypass mode for Polaris10
Saves power when not in use. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c3
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_clockpowergating.c6
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
index 670413fc37d0..b5f3b8ea12fe 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
@@ -858,7 +858,8 @@ static int uvd_v6_0_set_clockgating_state(void *handle,
858 bool enable = (state == AMD_CG_STATE_GATE) ? true : false; 858 bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
859 static int curstate = -1; 859 static int curstate = -1;
860 860
861 if (adev->asic_type == CHIP_FIJI) 861 if (adev->asic_type == CHIP_FIJI ||
862 adev->asic_type == CHIP_POLARIS10)
862 uvd_v6_set_bypass_mode(adev, enable); 863 uvd_v6_set_bypass_mode(adev, enable);
863 864
864 if (!(adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG)) 865 if (!(adev->cg_flags & AMD_CG_SUPPORT_UVD_MGCG))
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_clockpowergating.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_clockpowergating.c
index 8f142a74ad08..aeec25c66aa8 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_clockpowergating.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_clockpowergating.c
@@ -106,11 +106,17 @@ int polaris10_phm_powergate_uvd(struct pp_hwmgr *hwmgr, bool bgate)
106 data->uvd_power_gated = bgate; 106 data->uvd_power_gated = bgate;
107 107
108 if (bgate) { 108 if (bgate) {
109 cgs_set_clockgating_state(hwmgr->device,
110 AMD_IP_BLOCK_TYPE_UVD,
111 AMD_CG_STATE_GATE);
109 polaris10_update_uvd_dpm(hwmgr, true); 112 polaris10_update_uvd_dpm(hwmgr, true);
110 polaris10_phm_powerdown_uvd(hwmgr); 113 polaris10_phm_powerdown_uvd(hwmgr);
111 } else { 114 } else {
112 polaris10_phm_powerup_uvd(hwmgr); 115 polaris10_phm_powerup_uvd(hwmgr);
113 polaris10_update_uvd_dpm(hwmgr, false); 116 polaris10_update_uvd_dpm(hwmgr, false);
117 cgs_set_clockgating_state(hwmgr->device,
118 AMD_IP_BLOCK_TYPE_UVD,
119 AMD_PG_STATE_UNGATE);
114 } 120 }
115 121
116 return 0; 122 return 0;