drm/radeon: add atom get leakage vddc function
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Feb 2013 22:14:43 +0000 (17:14 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jun 2013 23:16:29 +0000 (19:16 -0400)
Required for DPM on SI.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_atombios.c

index be79a4d8bd271c8af436f110c801cfb08512a242..706b018e019ed587eb97bf7a1e2540de5f1c088d 100644 (file)
@@ -233,6 +233,9 @@ int radeon_atom_get_voltage_step(struct radeon_device *rdev,
                                 u8 voltage_type, u16 *voltage_step);
 int radeon_atom_get_max_vddc(struct radeon_device *rdev, u8 voltage_type,
                             u16 voltage_id, u16 *voltage);
+int radeon_atom_get_leakage_vddc_based_on_leakage_idx(struct radeon_device *rdev,
+                                                     u16 *voltage,
+                                                     u16 leakage_idx);
 int radeon_atom_round_to_true_voltage(struct radeon_device *rdev,
                                      u8 voltage_type,
                                      u16 nominal_voltage,
index 830c5580532d9a9ac437498c29ec87200f8abc7f..0ac7294867a3d6d214b1188793c47cbb6099848b 100644 (file)
@@ -3062,6 +3062,13 @@ int radeon_atom_get_max_vddc(struct radeon_device *rdev, u8 voltage_type,
        return 0;
 }
 
+int radeon_atom_get_leakage_vddc_based_on_leakage_idx(struct radeon_device *rdev,
+                                                     u16 *voltage,
+                                                     u16 leakage_idx)
+{
+       return radeon_atom_get_max_vddc(rdev, VOLTAGE_TYPE_VDDC, leakage_idx, voltage);
+}
+
 int radeon_atom_get_voltage_gpio_settings(struct radeon_device *rdev,
                                          u16 voltage_level, u8 voltage_type,
                                          u32 *gpio_value, u32 *gpio_mask)