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) |
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 84583302b081..f88946160854 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -692,6 +692,14 @@ out: | |||
692 | return err; | 692 | return err; |
693 | } | 693 | } |
694 | 694 | ||
695 | int tn_get_temp(struct radeon_device *rdev) | ||
696 | { | ||
697 | u32 temp = RREG32_SMC(TN_CURRENT_GNB_TEMP) & 0x7ff; | ||
698 | int actual_temp = (temp / 8) - 49; | ||
699 | |||
700 | return actual_temp * 1000; | ||
701 | } | ||
702 | |||
695 | /* | 703 | /* |
696 | * Core functions | 704 | * Core functions |
697 | */ | 705 | */ |