On 17/12/2012 13:35, Ozan Çağlayan wrote:
Hi Ozan,
Please have a look at this documentation:
http://cgit.freedesktop.org/nouveau/linux-2.6/tree/Documentation/thermal/nouveau_thermal
It will tell you how to use fan management on your card :)
Please report back! I am interested in your results!
Martin
Hey this is nice! I'll try it tonight when I'm back home.
Thanks :)
Here you go :)
I managed to reproduce the issue. Please test this patch!
Thanks for reporting,
Martin
>From 0227e8a93c697c325fb89b31b16aa5fe565c64d5 Mon Sep 17 00:00:00 2001
From: Martin Peres <martin.peres@xxxxxxxx>
Date: Mon, 17 Dec 2012 23:46:22 +0100
Subject: [PATCH] drm/nouveau/fan: handle the cases where we are outside of the
linear zone
Signed-off-by: Martin Peres <martin.peres@xxxxxxxx>
---
drivers/gpu/drm/nouveau/core/subdev/therm/base.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/base.c b/drivers/gpu/drm/nouveau/core/subdev/therm/base.c
index b35b4a2..25b7f6a 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/therm/base.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/therm/base.c
@@ -71,6 +71,13 @@ nouveau_therm_update_linear(struct nouveau_therm *therm)
u8 temp = therm->temp_get(therm);
u16 duty;
+ /* handle the non-linear part first */
+ if (temp < linear_min_temp)
+ return priv->fan->bios.min_duty;
+ else if (temp > linear_max_temp)
+ return priv->fan->bios.max_duty;
+
+ /* we are in the linear zone */
duty = (temp - linear_min_temp);
duty *= (priv->fan->bios.max_duty - priv->fan->bios.min_duty);
duty /= (linear_max_temp - linear_min_temp);
--
1.8.0.2
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel