Skip to contentSkip to conversation

drm/radeon/kms: fix thermal sensor reporting on rv6xx

PATCH In review Alex Deucher 1 participant 2 messages Nov 8, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: fix thermal sensor reporting on rv6xx

Temperature is not shifted as on newer asics.

---
 drivers/gpu/drm/radeon/r600.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
drivers/gpu/drm/radeon/r600.c +1 -7
index 951af00..bd69299 100644
@@ -106,14 +106,8 @@ u32 rv6xx_get_temp(struct radeon_device *rdev)
 {
 	u32 temp = (RREG32(CG_THERMAL_STATUS) & ASIC_T_MASK) >>
 		ASIC_T_SHIFT;
-	u32 actual_temp = 0;
 
-	if ((temp >> 7) & 1)
-		actual_temp = 0;
-	else
-		actual_temp = (temp >> 1) & 0xff;
-
-	return actual_temp * 1000;
+	return temp * 1000;
 }
 
 void r600_pm_get_dynpm_state(struct radeon_device *rdev)
Signature · 1 line
1.7.1.1
#1 lore raw
Quoted 3 lines · Alex Deucher

Temperature is not shifted as on newer asics.

Should be CC'ed to stable as well.

Alex

Quoted 28 lines

---
 drivers/gpu/drm/radeon/r600.c |    8 +-------

 1 files changed, 1 insertions(+), 7 deletions(-)
drivers/gpu/drm/radeon/r600.c +0 -0
index 951af00..bd69299 100644
@@ -106,14 +106,8 @@ u32 rv6xx_get_temp(struct radeon_device *rdev)
  {

       u32 temp = (RREG32(CG_THERMAL_STATUS) & ASIC_T_MASK) >> ASIC_T_SHIFT;
-       u32 actual_temp = 0;

-       if ((temp >> 7) & 1)
-               actual_temp = 0;
-       else
-               actual_temp = (temp >> 1) & 0xff;
-
-       return actual_temp * 1000;
+       return temp * 1000;
 }

 void r600_pm_get_dynpm_state(struct radeon_device *rdev) --
1.7.1.1