summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/kv_smc.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-09-10 03:27:01 +0400
committerAlex Deucher <alexander.deucher@amd.com>2013-09-11 19:44:38 +0400
commit64d03221eed88dce7f0c1edd44a3680b595b29bd (patch)
tree039a678bc817135e4c6b93adeb39116c95b597d8 /drivers/gpu/drm/radeon/kv_smc.c
parentef4e03658420bbf91365647615460668c2510e79 (diff)
downloadlinux-64d03221eed88dce7f0c1edd44a3680b595b29bd.tar.xz
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_smc.c')
-rw-r--r--drivers/gpu/drm/radeon/kv_smc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/kv_smc.c b/drivers/gpu/drm/radeon/kv_smc.c
index 34a226d7e34a..0000b59a6d05 100644
--- a/drivers/gpu/drm/radeon/kv_smc.c
+++ b/drivers/gpu/drm/radeon/kv_smc.c
@@ -107,6 +107,14 @@ int kv_smc_dpm_enable(struct radeon_device *rdev, bool enable)
return kv_notify_message_to_smu(rdev, PPSMC_MSG_DPM_Disable);
}
+int kv_smc_bapm_enable(struct radeon_device *rdev, bool enable)
+{
+ if (enable)
+ return kv_notify_message_to_smu(rdev, PPSMC_MSG_EnableBAPM);
+ else
+ return kv_notify_message_to_smu(rdev, PPSMC_MSG_DisableBAPM);
+}
+
int kv_copy_bytes_to_smc(struct radeon_device *rdev,
u32 smc_start_address,
const u8 *src, u32 byte_count, u32 limit)