diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2014-09-08 02:33:32 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-09-09 12:04:55 -0400 |
commit | ff4377924f7e587c61bcbc704eafecf6c7bd2e00 (patch) | |
tree | b5eefe82e209b0105ab38930430f9909036d5bcc | |
parent | df8fbc231b7e4a78dae2b02e116fe73e4ea63cb0 (diff) |
drm/radeon/dpm: set the thermal type properly for special configs
On systems with special thermal configurations make sure we make
note of the thermal setup. This is required for proper firmware
configuration on these systems.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 5f3b041330d6..e74c7e387dde 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -2288,19 +2288,31 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r | |||
2288 | (controller->ucFanParameters & | 2288 | (controller->ucFanParameters & |
2289 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); | 2289 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); |
2290 | rdev->pm.int_thermal_type = THERMAL_TYPE_KV; | 2290 | rdev->pm.int_thermal_type = THERMAL_TYPE_KV; |
2291 | } else if ((controller->ucType == | 2291 | } else if (controller->ucType == |
2292 | ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO) || | 2292 | ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO) { |
2293 | (controller->ucType == | 2293 | DRM_INFO("External GPIO thermal controller %s fan control\n", |
2294 | ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL) || | 2294 | (controller->ucFanParameters & |
2295 | (controller->ucType == | 2295 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); |
2296 | ATOM_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL)) { | 2296 | rdev->pm.int_thermal_type = THERMAL_TYPE_EXTERNAL_GPIO; |
2297 | DRM_INFO("Special thermal controller config\n"); | 2297 | } else if (controller->ucType == |
2298 | ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL) { | ||
2299 | DRM_INFO("ADT7473 with internal thermal controller %s fan control\n", | ||
2300 | (controller->ucFanParameters & | ||
2301 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); | ||
2302 | rdev->pm.int_thermal_type = THERMAL_TYPE_ADT7473_WITH_INTERNAL; | ||
2303 | } else if (controller->ucType == | ||
2304 | ATOM_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL) { | ||
2305 | DRM_INFO("EMC2103 with internal thermal controller %s fan control\n", | ||
2306 | (controller->ucFanParameters & | ||
2307 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); | ||
2308 | rdev->pm.int_thermal_type = THERMAL_TYPE_EMC2103_WITH_INTERNAL; | ||
2298 | } else if (controller->ucType < ARRAY_SIZE(pp_lib_thermal_controller_names)) { | 2309 | } else if (controller->ucType < ARRAY_SIZE(pp_lib_thermal_controller_names)) { |
2299 | DRM_INFO("Possible %s thermal controller at 0x%02x %s fan control\n", | 2310 | DRM_INFO("Possible %s thermal controller at 0x%02x %s fan control\n", |
2300 | pp_lib_thermal_controller_names[controller->ucType], | 2311 | pp_lib_thermal_controller_names[controller->ucType], |
2301 | controller->ucI2cAddress >> 1, | 2312 | controller->ucI2cAddress >> 1, |
2302 | (controller->ucFanParameters & | 2313 | (controller->ucFanParameters & |
2303 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); | 2314 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); |
2315 | rdev->pm.int_thermal_type = THERMAL_TYPE_EXTERNAL; | ||
2304 | i2c_bus = radeon_lookup_i2c_gpio(rdev, controller->ucI2cLine); | 2316 | i2c_bus = radeon_lookup_i2c_gpio(rdev, controller->ucI2cLine); |
2305 | rdev->pm.i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); | 2317 | rdev->pm.i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus); |
2306 | if (rdev->pm.i2c_bus) { | 2318 | if (rdev->pm.i2c_bus) { |