From 44a640b9acd195e99115228792abd8bdffc9328f Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 22 Jun 2011 02:13:23 +0100 Subject: [PATCH] --- yaml --- r: 260145 b: refs/heads/master c: 40ce4279e17e99bb98d02b8746fcf20abff8185b h: refs/heads/master i: 260143: 35538aa11a4e5dc9882df03d70a99bfb5956ba29 v: v3 --- [refs] | 2 +- trunk/drivers/gpu/drm/nouveau/nouveau_drv.h | 6 +++--- trunk/drivers/gpu/drm/nouveau/nouveau_temp.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 828748d4eb59..ab04bae09844 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0b33c936599d75b8d8ff6868fa0cbd5676d88b89 +refs/heads/master: 40ce4279e17e99bb98d02b8746fcf20abff8185b diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_drv.h b/trunk/drivers/gpu/drm/nouveau/nouveau_drv.h index d610edb044c4..72bfc143eb47 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -461,9 +461,9 @@ struct nouveau_pm_level { struct nouveau_pm_temp_sensor_constants { u16 offset_constant; s16 offset_mult; - u16 offset_div; - u16 slope_mult; - u16 slope_div; + s16 offset_div; + s16 slope_mult; + s16 slope_div; }; struct nouveau_pm_threshold_temp { diff --git a/trunk/drivers/gpu/drm/nouveau/nouveau_temp.c b/trunk/drivers/gpu/drm/nouveau/nouveau_temp.c index 649b0413b09f..47630fb669d0 100644 --- a/trunk/drivers/gpu/drm/nouveau/nouveau_temp.c +++ b/trunk/drivers/gpu/drm/nouveau/nouveau_temp.c @@ -43,7 +43,7 @@ nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp) /* Set the default sensor's contants */ sensor->offset_constant = 0; - sensor->offset_mult = 1; + sensor->offset_mult = 0; sensor->offset_div = 1; sensor->slope_mult = 1; sensor->slope_div = 1; @@ -109,7 +109,7 @@ nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp) /* Read the entries from the table */ for (i = 0; i < entries; i++) { - u16 value = ROM16(temp[1]); + s16 value = ROM16(temp[1]); switch (temp[0]) { case 0x01: @@ -160,8 +160,8 @@ nv40_sensor_setup(struct drm_device *dev) struct drm_nouveau_private *dev_priv = dev->dev_private; struct nouveau_pm_engine *pm = &dev_priv->engine.pm; struct nouveau_pm_temp_sensor_constants *sensor = &pm->sensor_constants; - u32 offset = sensor->offset_mult / sensor->offset_div; - u32 sensor_calibration; + s32 offset = sensor->offset_mult / sensor->offset_div; + s32 sensor_calibration; /* set up the sensors */ sensor_calibration = 120 - offset - sensor->offset_constant;