[Intel-gfx] [RFC 6/6] FOR_UPSTREAM [VPG]: drm/i915: call init_runtime_pm before gem_init

Paulo Zanoni przanoni at gmail.com
Wed Jan 22 14:44:07 CET 2014


2014/1/22  <naresh.kumar.kachhi at intel.com>:
> From: Naresh Kumar Kachhi <naresh.kumar.kachhi at intel.com>
>
> with current code intel_runtime_pm_gpu_idle is getting called
> even before runtime_pm is initialized. Moving runtime_pm_init
> before i915_gem_init
>
> Following is the call stack, note: by this time
> runtime_pm was not initialized
>
> intel_runtime_pm_gpu_idle+0x37/0x90
> i915_gem_retire_requests+0x8d/0xa0
> i915_gem_init_seqno+0x48/0x90
> i915_gem_set_seqno+0x2a/0x70
> i915_gem_init_hw+0x19c/0x300
> ?
> i915_gem_context_init+0x123/0x220
> i915_gem_init+0x57/0x1a0
> i915_driver_load+0xbf4/0xd50

And why exactly is this a problem? Delaying intel_init_runtime_pm is a
nice thing because we don't want our driver trying to runtime suspend
while it's still being loaded.

>
> Signed-off-by: Naresh Kumar Kachhi <naresh.kumar.kachhi at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_dma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index b5af745..85162da 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1511,6 +1511,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>         mutex_init(&dev_priv->dpio_lock);
>         mutex_init(&dev_priv->modeset_restore_lock);
>
> +       intel_init_runtime_pm(dev_priv);
> +
>         intel_pm_setup(dev);
>
>         intel_display_crc_init(dev);
> @@ -1674,8 +1676,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>         if (IS_GEN5(dev))
>                 intel_gpu_ips_init(dev_priv);
>
> -       intel_init_runtime_pm(dev_priv);
> -
>         return 0;
>
>  out_power_well:
> --
> 1.8.1.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni



More information about the Intel-gfx mailing list