[Intel-gfx] [PATCH 09/10] drm/i915: Create generic functions to control RC6, RPS

Chris Wilson chris at chris-wilson.co.uk
Thu Oct 5 17:54:13 UTC 2017


Quoting Sagar Arun Kamble (2017-10-04 15:07:24)
> Prepared generic functions intel_enable_rc6, intel_disable_rc6,
> intel_enable_rps and intel_disable_rps functions to setup RC6/RPS
> based on platforms.
> 
> 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 | 95 ++++++++++++++++++++++++++---------------
>  1 file changed, 61 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 62aed72..964df7b 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -7977,74 +7977,101 @@ 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)
> +void intel_disable_rc6(struct drm_i915_private *dev_priv)

Hmm, don't export these yet, as we need to define how to do the locking.

We normally would do

static void __intel_disable_rc6() {
	/* do stuff */
}

void intel_disable_rc6() {
	mutex_lock(i915->pm.pcu_lock);
	__intel_disable_rc6();
	mutex_unlock(i915->pm.pcu_lock);
}

Furthermore, we want to decide if we want these to track enabled state
and skip if already the desired state.

Otherwise \o/
-Chris


More information about the Intel-gfx mailing list