diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-09-09 23:33:08 (GMT) |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-09-11 15:44:40 (GMT) |
commit | b7a5ae97502e104371c7eb3b7b17ae959e50d6f5 (patch) | |
tree | 8317e440ff72ade26aa1a57547bb1190818ba054 /drivers/gpu/drm/radeon/kv_dpm.c | |
parent | 11877060e602d08a5ec8b127c273423d45ddabd9 (diff) | |
download | linux-fsl-qoriq-b7a5ae97502e104371c7eb3b7b17ae959e50d6f5.tar.xz |
drm/radeon/dpm: add bapm callback for kb/kv
This adds the enable_bapm callback for kb/kv.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/kv_dpm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/kv_dpm.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c index 92bb998..b98b9c9 100644 --- a/drivers/gpu/drm/radeon/kv_dpm.c +++ b/drivers/gpu/drm/radeon/kv_dpm.c @@ -1109,6 +1109,18 @@ static void kv_update_requested_ps(struct radeon_device *rdev, pi->requested_rps.ps_priv = &pi->requested_ps; } +void kv_dpm_enable_bapm(struct radeon_device *rdev, bool enable) +{ + struct kv_power_info *pi = kv_get_pi(rdev); + int ret; + + if (pi->bapm_enable) { + ret = kv_smc_bapm_enable(rdev, enable); + if (ret) + DRM_ERROR("kv_smc_bapm_enable failed\n"); + } +} + int kv_dpm_enable(struct radeon_device *rdev) { struct kv_power_info *pi = kv_get_pi(rdev); @@ -1772,6 +1784,14 @@ int kv_dpm_set_power_state(struct radeon_device *rdev) RADEON_CG_BLOCK_BIF | RADEON_CG_BLOCK_HDP), false); + if (pi->bapm_enable) { + ret = kv_smc_bapm_enable(rdev, rdev->pm.dpm.ac_power); + if (ret) { + DRM_ERROR("kv_smc_bapm_enable failed\n"); + return ret; + } + } + if (rdev->family == CHIP_KABINI) { if (pi->enable_dpm) { kv_set_valid_clock_range(rdev, new_ps); |