aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-02-19 17:14:43 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-06-27 19:16:29 -0400
commitbeb79f40b8dcc24153678c6ae31faf0fe50b9376 (patch)
tree01bcf82ea30656d5b0894b39df08ff52f017f53d
parentd719cef316d6377a7d6b5df495de118afb3a9fc2 (diff)
drm/radeon: add atom get leakage vddc function
Required for DPM on SI. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon.h3
-rw-r--r--drivers/gpu/drm/radeon/radeon_atombios.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index be79a4d8bd27..706b018e019e 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -233,6 +233,9 @@ int radeon_atom_get_voltage_step(struct radeon_device *rdev,
233 u8 voltage_type, u16 *voltage_step); 233 u8 voltage_type, u16 *voltage_step);
234int radeon_atom_get_max_vddc(struct radeon_device *rdev, u8 voltage_type, 234int radeon_atom_get_max_vddc(struct radeon_device *rdev, u8 voltage_type,
235 u16 voltage_id, u16 *voltage); 235 u16 voltage_id, u16 *voltage);
236int radeon_atom_get_leakage_vddc_based_on_leakage_idx(struct radeon_device *rdev,
237 u16 *voltage,
238 u16 leakage_idx);
236int radeon_atom_round_to_true_voltage(struct radeon_device *rdev, 239int radeon_atom_round_to_true_voltage(struct radeon_device *rdev,
237 u8 voltage_type, 240 u8 voltage_type,
238 u16 nominal_voltage, 241 u16 nominal_voltage,
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 830c5580532d..0ac7294867a3 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -3062,6 +3062,13 @@ int radeon_atom_get_max_vddc(struct radeon_device *rdev, u8 voltage_type,
3062 return 0; 3062 return 0;
3063} 3063}
3064 3064
3065int radeon_atom_get_leakage_vddc_based_on_leakage_idx(struct radeon_device *rdev,
3066 u16 *voltage,
3067 u16 leakage_idx)
3068{
3069 return radeon_atom_get_max_vddc(rdev, VOLTAGE_TYPE_VDDC, leakage_idx, voltage);
3070}
3071
3065int radeon_atom_get_voltage_gpio_settings(struct radeon_device *rdev, 3072int radeon_atom_get_voltage_gpio_settings(struct radeon_device *rdev,
3066 u16 voltage_level, u8 voltage_type, 3073 u16 voltage_level, u8 voltage_type,
3067 u32 *gpio_value, u32 *gpio_mask) 3074 u32 *gpio_value, u32 *gpio_mask)