[Intel-gfx] S4 resume breakage with i915 driver

Imre Deak imre.deak at intel.com
Tue Aug 30 11:33:46 UTC 2016


On ma, 2016-08-29 at 16:25 +0100, Chris Wilson wrote:
> On Mon, Aug 29, 2016 at 05:54:45PM +0300, Imre Deak wrote:
> > On ma, 2016-08-29 at 16:24 +0200, Takashi Iwai wrote:
> > > Hmm, this always confuses me.  Is the freeze callback called to
> > > the
> > > loader kernel?
> > 
> > It's called both in loader and target kernel, before creating or
> > restoring the image.
> 
> So the right answer for hiberation is?

It would be good to know what goes wrong first. Assuming Takashi has
the driver in his loader kernel these are the GPU specific steps in his
hibernation sequence:

Loader kernel:
i915_pm_freeze()->
  i915_gem_suspend()
i915_pm_freeze_late()->
  pci_disable_device()
  pci_set_power_state(D3)

<restore target kernel image>

Target kernel:
i915_pm_restore_early()->
  pci_set_power_state(D0)
  pci_enable_device()
i915_pm_restore()
  i915_gem_resume()

Nothing seems wrong to me here, and after i915_gem_suspend() there
should be no GPU activity any more. In any case if there is no better
explanation for the root cause I'd try the reset in i915_gem_suspend()
or i915_gem_resume().

--Imre

> diff --git a/drivers/gpu/drm/i915/i915_drv.c
> b/drivers/gpu/drm/i915/i915_drv.c
> index 492c4d4e5ebc..892e1626a9ad 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1915,6 +1915,7 @@ static int i915_pm_freeze_late(struct device
> *kdev)
>         if (ret)
>                 return ret;
>  
> +       intel_gpu_reset(dev_priv, ALL_ENGINES);
>         return 0;
>  }
> 


More information about the Intel-gfx mailing list