public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Tom.O'Rourke@intel.com, intel-gfx@lists.freedesktop.org
Cc: a@phire.org, daniel.vetter@ffwll.ch
Subject: Re: [PATCH] drm/i915: Clamp efficient frequency to valid	range
Date: Wed, 11 Feb 2015 10:27:34 +0200	[thread overview]
Message-ID: <87y4o4ua2x.fsf@intel.com> (raw)
In-Reply-To: <1423638406-87273-1-git-send-email-Tom.O'Rourke@intel.com>

On Wed, 11 Feb 2015, Tom.O'Rourke@intel.com wrote:
> From: Tom O'Rourke <Tom.O'Rourke@intel.com>
>
> The efficient frequency (RPe) should stay in the range
> RPn <= RPe <= RP0.  The pcode clamps the returned value
> internally on Broadwell but not on Haswell.
>
> Fix for missing range check in
> commit 93ee29203f506582cca2bcec5f05041526d9ab0a
> Author: Tom O'Rourke <Tom.O'Rourke@intel.com>
> Date:   Wed Nov 19 14:21:52 2014 -0800
>
>     drm/i915: Use efficient frequency for HSW/BDW
>
> Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-February/059802.html
> Reported-by: Michael Auchter <a@phire.org>
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Tom O'Rourke <Tom.O'Rourke@intel.com>

Pushed to drm-intel-next-fixes with cc: stable for v3.19. Thanks for the
patch.

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/intel_pm.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index a3b979d..602c443 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3998,7 +3998,10 @@ static void gen6_init_rps_frequencies(struct drm_device *dev)
>  					&ddcc_status);
>  		if (0 == ret)
>  			dev_priv->rps.efficient_freq =
> -				(ddcc_status >> 8) & 0xff;
> +				clamp_t(u8,
> +					((ddcc_status >> 8) & 0xff),
> +					dev_priv->rps.min_freq,
> +					dev_priv->rps.max_freq);
>  	}
>  
>  	/* Preserve min/max settings in case of re-init */
> -- 
> 1.7.9.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2015-02-11  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11  7:06 [PATCH] drm/i915: Clamp efficient frequency to valid range Tom.O'Rourke
2015-02-11  8:27 ` Jani Nikula [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=87y4o4ua2x.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Tom.O'Rourke@intel.com \
    --cc=a@phire.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox