[Intel-gfx] [PATCH v2 10/11] drm/i915: Create generic functions to control RC6, RPS
Chris Wilson
chris at chris-wilson.co.uk
Fri Oct 6 12:46:38 UTC 2017
Quoting Sagar Arun Kamble (2017-10-06 13:13:39)
> Prepared generic functions intel_enable_rc6, intel_disable_rc6,
> intel_enable_rps and intel_disable_rps functions to setup RC6/RPS
> based on platforms.
>
> v2: Make intel_enable/disable_rc6/rps static. (Chris)
>
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble at intel.com>
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg at intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 97 ++++++++++++++++++++++++++---------------
> 1 file changed, 62 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index ce2dc5b..03264fe 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -7972,75 +7972,102 @@ void intel_sanitize_gt_powersave(struct drm_i915_private *dev_priv)
> gen6_reset_rps_interrupts(dev_priv);
> }
>
> -void intel_disable_gt_powersave(struct drm_i915_private *dev_priv)
> +static void intel_disable_rc6(struct drm_i915_private *dev_priv)
> {
> - if (!READ_ONCE(dev_priv->pm.rps.enabled))
> - return;
> -
> - mutex_lock(&dev_priv->pm.pcu_lock);
lockdep_assert_held(dev_priv->pm.pcu_lock); ?
We often skip it for statics, unless we know we are planning on adding
an interface that may not take the lock.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list