drm/radeon/kms: add support for internal thermal sensor on SI
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:

committed by
Dave Airlie

parent
14607d0836
commit
1bd47d2e16
@@ -28,6 +28,25 @@
|
||||
#include "sid.h"
|
||||
#include "atom.h"
|
||||
|
||||
/* get temperature in millidegrees */
|
||||
int si_get_temp(struct radeon_device *rdev)
|
||||
{
|
||||
u32 temp;
|
||||
int actual_temp = 0;
|
||||
|
||||
temp = (RREG32(CG_MULT_THERMAL_STATUS) & CTF_TEMP_MASK) >>
|
||||
CTF_TEMP_SHIFT;
|
||||
|
||||
if (temp & 0x200)
|
||||
actual_temp = 255;
|
||||
else
|
||||
actual_temp = temp & 0x1ff;
|
||||
|
||||
actual_temp = (actual_temp * 1000);
|
||||
|
||||
return actual_temp;
|
||||
}
|
||||
|
||||
/* watermark setup */
|
||||
static u32 dce6_line_buffer_adjust(struct radeon_device *rdev,
|
||||
struct radeon_crtc *radeon_crtc,
|
||||
|
Reference in New Issue
Block a user