[Intel-gfx] [PATCH 2/2] drm/i915: Resume GuC before using GEM

Sagar Arun Kamble sagar.a.kamble at intel.com
Tue Nov 14 17:45:23 UTC 2017



On 11/14/2017 6:33 PM, Chris Wilson wrote:
> Resuming GEM presumes it can talk to hw, in particular to ensure the
> kernel context is loaded upon resume for powersaving. If the GuC is
> still asleep at this point, we upset the HW. Rearrange the resume such
> that we restore the original order of init-hw, resume-guc, use-gem.
>
> Fixes: 37cd33006d02 ("drm/i915: Remove redundant intel_autoenable_gt_powersave()")
> References: a1c419941453 ("drm/i915/guc: Add host2guc notification for suspend and resume")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Alex Dai <yu.dai at intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kamble at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
Reviewed-by: Sagar Arun Kamble <sagar.a.kamble at intel.com>
> ---
>   drivers/gpu/drm/i915/i915_drv.c | 2 --
>   drivers/gpu/drm/i915/i915_gem.c | 2 ++
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 42813f4247e2..5e40ab39b4cd 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1708,8 +1708,6 @@ static int i915_drm_resume(struct drm_device *dev)
>   
>   	i915_gem_resume(dev_priv);
>   
> -	intel_guc_resume(dev_priv);
> -
>   	intel_modeset_init_hw(dev);
>   
>   	spin_lock_irq(&dev_priv->irq_lock);
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index a7979b74ce21..bf8fea792048 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4852,6 +4852,8 @@ void i915_gem_resume(struct drm_i915_private *i915)
>   	if (i915_gem_init_hw(i915))
>   		goto err_wedged;
>   
> +	intel_guc_resume(i915);
> +
>   	/* Always reload a context for powersaving. */
>   	if (i915_gem_switch_to_kernel_context(i915))
>   		goto err_wedged;



More information about the Intel-gfx mailing list