Re: [PATCH] drm/i915: Always catch incorrect usage of intel_runtime_pm_get

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

 



Quoting Tvrtko Ursulin (2018-02-12 09:01:20)
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> Put an explicit might_sleep at the start of intel_runtime_pm_get so we
> always catch incorrect usage, regardless of the code path taken in
> pm_runtime_get_sync.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_runtime_pm.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index 70e659772a7a..338dbfd7d228 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -3188,6 +3188,12 @@ void intel_runtime_pm_get(struct drm_i915_private *dev_priv)
>         struct device *kdev = &pdev->dev;
>         int ret;
>  
> +       /*
> +        * Catch incorrect usage regardless of the code path taken in
> +        * pm_runtime_get_sync.
> +        */

Maybe a touch of explanation?

* For example, when waking the device from a PCI sleep state it will
* take several millisecond (per spec) for the device to power on, during
* which time we sleep.

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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