[Intel-gfx] [PATCH 5/6] drm/i915: Make the rps new_delay comparison more readable
Jesse Barnes
jbarnes at virtuousgeek.org
Tue Jun 25 21:06:32 CEST 2013
On Tue, 25 Jun 2013 19:21:05 +0300
ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Eliminate the weird inverted logic from the rps new_delay comparison.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 611da3a..62f8b2d 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -707,8 +707,8 @@ static void gen6_pm_rps_work(struct work_struct *work)
> /* sysfs frequency interfaces may have snuck in while servicing the
> * interrupt
> */
> - if (!(new_delay > dev_priv->rps.max_delay ||
> - new_delay < dev_priv->rps.min_delay)) {
> + if (new_delay >= dev_priv->rps.min_delay &&
> + new_delay <= dev_priv->rps.max_delay) {
> if (IS_VALLEYVIEW(dev_priv->dev))
> valleyview_set_rps(dev_priv->dev, new_delay);
> else
Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list