diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/ppsmc.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/trinity_dpm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/trinity_dpm.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/trinity_smc.c | 8 |
4 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/ppsmc.h b/drivers/gpu/drm/radeon/ppsmc.h index 682842804bce..5670b8291285 100644 --- a/drivers/gpu/drm/radeon/ppsmc.h +++ b/drivers/gpu/drm/radeon/ppsmc.h | |||
@@ -163,6 +163,8 @@ typedef uint8_t PPSMC_Result; | |||
163 | #define PPSMC_MSG_VCEPowerON ((uint32_t) 0x10f) | 163 | #define PPSMC_MSG_VCEPowerON ((uint32_t) 0x10f) |
164 | #define PPSMC_MSG_DCE_RemoveVoltageAdjustment ((uint32_t) 0x11d) | 164 | #define PPSMC_MSG_DCE_RemoveVoltageAdjustment ((uint32_t) 0x11d) |
165 | #define PPSMC_MSG_DCE_AllowVoltageAdjustment ((uint32_t) 0x11e) | 165 | #define PPSMC_MSG_DCE_AllowVoltageAdjustment ((uint32_t) 0x11e) |
166 | #define PPSMC_MSG_EnableBAPM ((uint32_t) 0x120) | ||
167 | #define PPSMC_MSG_DisableBAPM ((uint32_t) 0x121) | ||
166 | #define PPSMC_MSG_UVD_DPM_Config ((uint32_t) 0x124) | 168 | #define PPSMC_MSG_UVD_DPM_Config ((uint32_t) 0x124) |
167 | 169 | ||
168 | 170 | ||
diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c index b07b7b8f1aff..b1b5b3f5e07b 100644 --- a/drivers/gpu/drm/radeon/trinity_dpm.c +++ b/drivers/gpu/drm/radeon/trinity_dpm.c | |||
@@ -1091,6 +1091,7 @@ int trinity_dpm_enable(struct radeon_device *rdev) | |||
1091 | trinity_program_sclk_dpm(rdev); | 1091 | trinity_program_sclk_dpm(rdev); |
1092 | trinity_start_dpm(rdev); | 1092 | trinity_start_dpm(rdev); |
1093 | trinity_wait_for_dpm_enabled(rdev); | 1093 | trinity_wait_for_dpm_enabled(rdev); |
1094 | trinity_dpm_bapm_enable(rdev, false); | ||
1094 | trinity_release_mutex(rdev); | 1095 | trinity_release_mutex(rdev); |
1095 | 1096 | ||
1096 | if (rdev->irq.installed && | 1097 | if (rdev->irq.installed && |
@@ -1116,6 +1117,7 @@ void trinity_dpm_disable(struct radeon_device *rdev) | |||
1116 | trinity_release_mutex(rdev); | 1117 | trinity_release_mutex(rdev); |
1117 | return; | 1118 | return; |
1118 | } | 1119 | } |
1120 | trinity_dpm_bapm_enable(rdev, false); | ||
1119 | trinity_disable_clock_power_gating(rdev); | 1121 | trinity_disable_clock_power_gating(rdev); |
1120 | sumo_clear_vc(rdev); | 1122 | sumo_clear_vc(rdev); |
1121 | trinity_wait_for_level_0(rdev); | 1123 | trinity_wait_for_level_0(rdev); |
diff --git a/drivers/gpu/drm/radeon/trinity_dpm.h b/drivers/gpu/drm/radeon/trinity_dpm.h index e82df071f8b3..259d9e817c96 100644 --- a/drivers/gpu/drm/radeon/trinity_dpm.h +++ b/drivers/gpu/drm/radeon/trinity_dpm.h | |||
@@ -118,6 +118,7 @@ struct trinity_power_info { | |||
118 | #define TRINITY_AT_DFLT 30 | 118 | #define TRINITY_AT_DFLT 30 |
119 | 119 | ||
120 | /* trinity_smc.c */ | 120 | /* trinity_smc.c */ |
121 | int trinity_dpm_bapm_enable(struct radeon_device *rdev, bool enable); | ||
121 | int trinity_dpm_config(struct radeon_device *rdev, bool enable); | 122 | int trinity_dpm_config(struct radeon_device *rdev, bool enable); |
122 | int trinity_uvd_dpm_config(struct radeon_device *rdev); | 123 | int trinity_uvd_dpm_config(struct radeon_device *rdev); |
123 | int trinity_dpm_force_state(struct radeon_device *rdev, u32 n); | 124 | int trinity_dpm_force_state(struct radeon_device *rdev, u32 n); |
diff --git a/drivers/gpu/drm/radeon/trinity_smc.c b/drivers/gpu/drm/radeon/trinity_smc.c index a42d89f1830c..9672bcbc7312 100644 --- a/drivers/gpu/drm/radeon/trinity_smc.c +++ b/drivers/gpu/drm/radeon/trinity_smc.c | |||
@@ -56,6 +56,14 @@ static int trinity_notify_message_to_smu(struct radeon_device *rdev, u32 id) | |||
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | 58 | ||
59 | int trinity_dpm_bapm_enable(struct radeon_device *rdev, bool enable) | ||
60 | { | ||
61 | if (enable) | ||
62 | return trinity_notify_message_to_smu(rdev, PPSMC_MSG_EnableBAPM); | ||
63 | else | ||
64 | return trinity_notify_message_to_smu(rdev, PPSMC_MSG_DisableBAPM); | ||
65 | } | ||
66 | |||
59 | int trinity_dpm_config(struct radeon_device *rdev, bool enable) | 67 | int trinity_dpm_config(struct radeon_device *rdev, bool enable) |
60 | { | 68 | { |
61 | if (enable) | 69 | if (enable) |