diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-12-14 11:57:36 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-06-27 10:49:17 -0400 |
commit | 29a152218980fee821da952cb4edea2e3231ee0c (patch) | |
tree | abef5398674ab0eeaef42e8a4bb2c68043d73c4a /drivers/gpu/drm/radeon/ni.c | |
parent | 6bd1c3853210e36569601096e2344f8258fd516d (diff) | |
download | op-kernel-dev-29a152218980fee821da952cb4edea2e3231ee0c.zip op-kernel-dev-29a152218980fee821da952cb4edea2e3231ee0c.tar.gz |
drm/radeon: add support for thermal sensor on tn
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/ni.c')
-rw-r--r-- | drivers/gpu/drm/radeon/ni.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 8458330..f889461 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -692,6 +692,14 @@ out: return err; } +int tn_get_temp(struct radeon_device *rdev) +{ + u32 temp = RREG32_SMC(TN_CURRENT_GNB_TEMP) & 0x7ff; + int actual_temp = (temp / 8) - 49; + + return actual_temp * 1000; +} + /* * Core functions */ |