All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Peres <martin.peres-BktLLJ5BOkI@public.gmane.org>
To: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 1/3] drm/nouveau/therm: turn on a fan only when crossing threshold in positive direction
Date: Mon, 04 Feb 2013 13:22:30 +0100	[thread overview]
Message-ID: <510FA806.3000701@labri.fr> (raw)
In-Reply-To: <1359922077-3347-1-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On 03/02/2013 21:07, Marcin Slusarz wrote:
> + the same for shutdown threshold - seems impossible, but shutdown can fail.
>
> Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Looks good. Please add my signed-off-by

Signed-off-by: Martin Peres <martin.peres-BktLLJ5BOkI@public.gmane.org>
> ---
>   drivers/gpu/drm/nouveau/core/subdev/therm/temp.c | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
> index bf9b3ce..8f27b44 100644
> --- a/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
> +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
> @@ -105,7 +105,7 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
>   		return;
>   
>   	if (dir == NOUVEAU_THERM_THRS_FALLING)
> -		nv_info(therm, "temperature (%u C) went bellow the '%s' threshold\n",
> +		nv_info(therm, "temperature (%u C) went below the '%s' threshold\n",
>   			temperature, thresolds[thrs]);
>   	else
>   		nv_info(therm, "temperature (%u C) hit the '%s' threshold\n",
> @@ -114,8 +114,10 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
>   	active = (dir == NOUVEAU_THERM_THRS_RISING);
>   	switch (thrs) {
>   	case NOUVEAU_THERM_THRS_FANBOOST:
> -		nouveau_therm_fan_set(therm, true, 100);
> -		nouveau_therm_mode(therm, NOUVEAU_THERM_CTRL_AUTO);
> +		if (active) {
> +			nouveau_therm_fan_set(therm, true, 100);
> +			nouveau_therm_mode(therm, NOUVEAU_THERM_CTRL_AUTO);
> +		}
>   		break;
>   	case NOUVEAU_THERM_THRS_DOWNCLOCK:
>   		if (priv->emergency.downclock)
> @@ -126,7 +128,8 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
>   			priv->emergency.pause(therm, active);
>   		break;
>   	case NOUVEAU_THERM_THRS_SHUTDOWN:
> -		orderly_poweroff(true);
> +		if (active)
> +			orderly_poweroff(true);
>   		break;
>   	case NOUVEAU_THERM_THRS_NR:
>   		break;

      parent reply	other threads:[~2013-02-04 12:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-03 20:07 [PATCH 1/3] drm/nouveau/therm: turn on a fan only when crossing threshold in positive direction Marcin Slusarz
     [not found] ` <1359922077-3347-1-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-02-04 12:22   ` Martin Peres [this message]

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=510FA806.3000701@labri.fr \
    --to=martin.peres-bktllj5boki@public.gmane.org \
    --cc=marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /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.