diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-03-20 17:18:09 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-03-21 02:55:52 -0400 |
commit | 14607d08366c3787f70b8e5a0a29adfb28e5f128 (patch) | |
tree | ce020f59645cb900cf55dac7ca72a5c2c95fb0b0 /drivers | |
parent | e83753bb61f6d2184daf3c59707094d8994ec85e (diff) |
drm/radeon/kms: update power table parsing for SI
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 03ab8ff81fec..aaad93d7076b 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -977,6 +977,7 @@ enum radeon_int_thermal_type { | |||
977 | THERMAL_TYPE_EVERGREEN, | 977 | THERMAL_TYPE_EVERGREEN, |
978 | THERMAL_TYPE_SUMO, | 978 | THERMAL_TYPE_SUMO, |
979 | THERMAL_TYPE_NI, | 979 | THERMAL_TYPE_NI, |
980 | THERMAL_TYPE_SI, | ||
980 | }; | 981 | }; |
981 | 982 | ||
982 | struct radeon_voltage { | 983 | struct radeon_voltage { |
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index afb127c02b60..f6e69b8c06c6 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -1894,6 +1894,8 @@ static const char *pp_lib_thermal_controller_names[] = { | |||
1894 | "emc2103", | 1894 | "emc2103", |
1895 | "Sumo", | 1895 | "Sumo", |
1896 | "Northern Islands", | 1896 | "Northern Islands", |
1897 | "Southern Islands", | ||
1898 | "lm96163", | ||
1897 | }; | 1899 | }; |
1898 | 1900 | ||
1899 | union power_info { | 1901 | union power_info { |
@@ -1910,6 +1912,7 @@ union pplib_clock_info { | |||
1910 | struct _ATOM_PPLIB_RS780_CLOCK_INFO rs780; | 1912 | struct _ATOM_PPLIB_RS780_CLOCK_INFO rs780; |
1911 | struct _ATOM_PPLIB_EVERGREEN_CLOCK_INFO evergreen; | 1913 | struct _ATOM_PPLIB_EVERGREEN_CLOCK_INFO evergreen; |
1912 | struct _ATOM_PPLIB_SUMO_CLOCK_INFO sumo; | 1914 | struct _ATOM_PPLIB_SUMO_CLOCK_INFO sumo; |
1915 | struct _ATOM_PPLIB_SI_CLOCK_INFO si; | ||
1913 | }; | 1916 | }; |
1914 | 1917 | ||
1915 | union pplib_power_state { | 1918 | union pplib_power_state { |
@@ -2167,6 +2170,11 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r | |||
2167 | (controller->ucFanParameters & | 2170 | (controller->ucFanParameters & |
2168 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); | 2171 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); |
2169 | rdev->pm.int_thermal_type = THERMAL_TYPE_NI; | 2172 | rdev->pm.int_thermal_type = THERMAL_TYPE_NI; |
2173 | } else if (controller->ucType == ATOM_PP_THERMALCONTROLLER_SISLANDS) { | ||
2174 | DRM_INFO("Internal thermal controller %s fan control\n", | ||
2175 | (controller->ucFanParameters & | ||
2176 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); | ||
2177 | rdev->pm.int_thermal_type = THERMAL_TYPE_SI; | ||
2170 | } else if ((controller->ucType == | 2178 | } else if ((controller->ucType == |
2171 | ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO) || | 2179 | ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO) || |
2172 | (controller->ucType == | 2180 | (controller->ucType == |
@@ -2299,6 +2307,19 @@ static bool radeon_atombios_parse_pplib_clock_info(struct radeon_device *rdev, | |||
2299 | sclk |= clock_info->rs780.ucLowEngineClockHigh << 16; | 2307 | sclk |= clock_info->rs780.ucLowEngineClockHigh << 16; |
2300 | rdev->pm.power_state[state_index].clock_info[mode_index].sclk = sclk; | 2308 | rdev->pm.power_state[state_index].clock_info[mode_index].sclk = sclk; |
2301 | } | 2309 | } |
2310 | } else if (ASIC_IS_DCE6(rdev)) { | ||
2311 | sclk = le16_to_cpu(clock_info->si.usEngineClockLow); | ||
2312 | sclk |= clock_info->si.ucEngineClockHigh << 16; | ||
2313 | mclk = le16_to_cpu(clock_info->si.usMemoryClockLow); | ||
2314 | mclk |= clock_info->si.ucMemoryClockHigh << 16; | ||
2315 | rdev->pm.power_state[state_index].clock_info[mode_index].mclk = mclk; | ||
2316 | rdev->pm.power_state[state_index].clock_info[mode_index].sclk = sclk; | ||
2317 | rdev->pm.power_state[state_index].clock_info[mode_index].voltage.type = | ||
2318 | VOLTAGE_SW; | ||
2319 | rdev->pm.power_state[state_index].clock_info[mode_index].voltage.voltage = | ||
2320 | le16_to_cpu(clock_info->si.usVDDC); | ||
2321 | rdev->pm.power_state[state_index].clock_info[mode_index].voltage.vddci = | ||
2322 | le16_to_cpu(clock_info->si.usVDDCI); | ||
2302 | } else if (ASIC_IS_DCE4(rdev)) { | 2323 | } else if (ASIC_IS_DCE4(rdev)) { |
2303 | sclk = le16_to_cpu(clock_info->evergreen.usEngineClockLow); | 2324 | sclk = le16_to_cpu(clock_info->evergreen.usEngineClockLow); |
2304 | sclk |= clock_info->evergreen.ucEngineClockHigh << 16; | 2325 | sclk |= clock_info->evergreen.ucEngineClockHigh << 16; |