diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-09-10 01:27:01 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-09-11 17:44:38 +0200 |
commit | 64d03221eed88dce7f0c1edd44a3680b595b29bd (patch) | |
tree | 039a678bc817135e4c6b93adeb39116c95b597d8 /drivers/gpu/drm/radeon/kv_dpm.c | |
parent | drm/radeon/dpm: handle bapm on trinity (diff) | |
download | linux-64d03221eed88dce7f0c1edd44a3680b595b29bd.tar.xz linux-64d03221eed88dce7f0c1edd44a3680b595b29bd.zip |
drm/radeon/dpm: handle bapm on kb/kv
bapm is a power management feature for handling the
power budget between the CPU and GPU on APUs. This
patch adds support for enabling or disabling it.
For now disable it by default. Enabling it properly
requires quite a bit more work and will be addressed
in a separate patch.
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 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c index c87d1945a6f3..92bb998cc611 100644 --- a/drivers/gpu/drm/radeon/kv_dpm.c +++ b/drivers/gpu/drm/radeon/kv_dpm.c @@ -1214,6 +1214,12 @@ int kv_dpm_enable(struct radeon_device *rdev) radeon_irq_set(rdev); } + ret = kv_smc_bapm_enable(rdev, false); + if (ret) { + DRM_ERROR("kv_smc_bapm_enable failed\n"); + return ret; + } + /* powerdown unused blocks for now */ kv_dpm_powergate_acp(rdev, true); kv_dpm_powergate_samu(rdev, true); @@ -1237,6 +1243,8 @@ void kv_dpm_disable(struct radeon_device *rdev) RADEON_CG_BLOCK_BIF | RADEON_CG_BLOCK_HDP), false); + kv_smc_bapm_enable(rdev, false); + /* powerup blocks */ kv_dpm_powergate_acp(rdev, false); kv_dpm_powergate_samu(rdev, false); |