From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Peres Subject: Re: Fan control in nouveau driver with geforce 9600gt Date: Mon, 17 Dec 2012 23:48:45 +0100 Message-ID: <50CFA14D.4000703@free.fr> References: <50CE791A.4040801@free.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050702040904090408090003" Return-path: Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by gabe.freedesktop.org (Postfix) with ESMTP id DF505E5C5C for ; Mon, 17 Dec 2012 14:48:53 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: =?UTF-8?B?T3phbiDDh2HEn2xheWFu?= Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org This is a multi-part message in MIME format. --------------050702040904090408090003 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 17/12/2012 13:35, Ozan =C3=87a=C4=9Flayan wrote: >> Hi Ozan, >> >> Please have a look at this documentation: >> http://cgit.freedesktop.org/nouveau/linux-2.6/tree/Documentation/therm= al/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 --------------050702040904090408090003 Content-Type: text/x-patch; name="0001-drm-nouveau-fan-handle-the-cases-where-we-are-outsid.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-drm-nouveau-fan-handle-the-cases-where-we-are-outsid.pa"; filename*1="tch" >>From 0227e8a93c697c325fb89b31b16aa5fe565c64d5 Mon Sep 17 00:00:00 2001 From: Martin Peres 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 --- 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 --------------050702040904090408090003 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --------------050702040904090408090003--