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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/12/19 Paulo Zanoni <przanoni@xxxxxxxxx>:
> From: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
>
> 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@xxxxxxxxx>

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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux