All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Peres <martin.peres@free.fr>
To: "Ozan Çağlayan" <ozancag@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: Fan control in nouveau driver with geforce 9600gt
Date: Mon, 17 Dec 2012 23:48:45 +0100	[thread overview]
Message-ID: <50CFA14D.4000703@free.fr> (raw)
In-Reply-To: <CAFub=KR6oVp0zSGymr9YgEoPT4oY28X7JJc8MNURKX2K9sjW1A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

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

[-- Attachment #2: 0001-drm-nouveau-fan-handle-the-cases-where-we-are-outsid.patch --]
[-- Type: text/x-patch, Size: 1153 bytes --]

>From 0227e8a93c697c325fb89b31b16aa5fe565c64d5 Mon Sep 17 00:00:00 2001
From: Martin Peres <martin.peres@labri.fr>
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@labri.fr>
---
 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


[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2012-12-17 22:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-13 10:02 Fan control in nouveau driver with geforce 9600gt Ozan Çağlayan
2012-12-17  1:44 ` Martin Peres
2012-12-17 12:35   ` Ozan Çağlayan
2012-12-17 22:48     ` Martin Peres [this message]
2012-12-19 19:39       ` Ozan Çağlayan
2012-12-20  0:27         ` Martin Peres
2012-12-20 13:07           ` Ozan Çağlayan
2012-12-20 18:33             ` Martin Peres
2012-12-21 12:04               ` Ozan Çağlayan
2012-12-21 23:43                 ` Martin Peres
2013-01-07 16:25                   ` Ozan Çağlayan
2013-01-14 14:12                     ` Martin Peres

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50CFA14D.4000703@free.fr \
    --to=martin.peres@free.fr \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ozancag@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.