[Intel-gfx] [PATCH 06/19] drm/i915: get/put runtime PM when we get/put a power domain

Paulo Zanoni przanoni at gmail.com
Fri Jan 24 20:58:19 CET 2014


2013/12/19 Paulo Zanoni <przanoni at gmail.com>:
> From: Paulo Zanoni <paulo.r.zanoni at intel.com>
>
> Any power domain will require the HW to be in PCI D0 state, so just do
> the simple thing.
>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>

Just a notice, in case anyone decides to apply this patch:

Since both intel_display_power_get and intel_display_power_put are
very similar, "git am" may get confused when you apply the patch, and
it may add the "intel_runtime_pm_get()" call to
intel_display_power_put instead of intel_display_power_get. So please
pay attention, especially if you start getting lots of WARNs when you
enter runtime PM :)

Thanks,
Paulo

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index c644a6f..273e806 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5301,6 +5301,8 @@ void intel_display_power_get(struct drm_device *dev,
>         struct i915_power_well *power_well;
>         int i;
>
> +       intel_runtime_pm_get(dev_priv);
> +
>         power_domains = &dev_priv->power_domains;
>
>         mutex_lock(&power_domains->lock);
> @@ -5332,6 +5334,8 @@ void intel_display_power_put(struct drm_device *dev,
>                 __intel_power_well_put(dev, power_well);
>
>         mutex_unlock(&power_domains->lock);
> +
> +       intel_runtime_pm_put(dev_priv);
>  }
>
>  static struct i915_power_domains *hsw_pwr;
> --
> 1.8.3.1
>



-- 
Paulo Zanoni



More information about the Intel-gfx mailing list