diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-11-22 17:56:32 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-11-23 09:23:29 +1000 |
commit | e33df25fecd31be889a878bc75313817bc292bac (patch) | |
tree | 8e42dddd4d00d3dd475c05bf4588c49d0682cfcc /drivers/gpu/drm/radeon/evergreen.c | |
parent | d5e455e48b095df7f5381dff028f8523aaf565a9 (diff) | |
download | lwn-e33df25fecd31be889a878bc75313817bc292bac.tar.gz lwn-e33df25fecd31be889a878bc75313817bc292bac.zip |
drm/radeon/kms: add thermal sensor support for fusion APUs
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 7f859ffe99ce..075d6c172595 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -57,6 +57,14 @@ u32 evergreen_get_temp(struct radeon_device *rdev) return actual_temp * 1000; } +u32 sumo_get_temp(struct radeon_device *rdev) +{ + u32 temp = RREG32(CG_THERMAL_STATUS) & 0xff; + u32 actual_temp = (temp >> 1) & 0xff; + + return actual_temp * 1000; +} + void evergreen_pm_misc(struct radeon_device *rdev) { int req_ps_idx = rdev->pm.requested_power_state_index; |