[Intel-gfx] [PATCH] drm/i915: Disable runtime power management during shutdown
Imre Deak
imre.deak at intel.com
Wed Feb 3 15:39:52 UTC 2021
On Wed, Feb 03, 2021 at 01:40:05PM +0200, Ville Syrjälä wrote:
> On Thu, Jan 28, 2021 at 09:13:49PM +0200, Imre Deak wrote:
> > On Wed, Jan 27, 2021 at 08:19:09PM +0200, Imre Deak wrote:
> > > At least on some TGL platforms PUNIT wants to access some display HW
> > > registers, but it doesn't handle display power managment (disabling DC
> > > states as required) and so this register access will lead to a hang. To
> > > prevent this disable runtime power management for poweroff and reboot.
> > >
> > > Reported-and-tested-by: Khaled Almahallawy <khaled.almahallawy at intel.com>
> > > Signed-off-by: Imre Deak <imre.deak at intel.com>
> >
> > Chris or Ville, could you ack if you see no problem with this?
>
> Looks consistent enough with the other paths.
>
> I guess we're now powering on pretty much everything before
> reboot shutdown due to the INIT domain?
Yes all, except for GLK+ DDI_IO and ICL+ AUX since the enabling of those
has a restriction wrt. other modeset sequence steps.
> Hopefully no harm in that.
The only requirement is to disable DC states and all/most power wells
should be eventually removed from the INIT domain. For now I wanted to
get this sequence closer to the module reload one. I can add a code
comment about these details.
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> > > ---
> > > drivers/gpu/drm/i915/i915_drv.c | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > > index 0037b81d991e..6f83cca8e27b 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.c
> > > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > > @@ -1054,6 +1054,8 @@ static void intel_shutdown_encoders(struct drm_i915_private *dev_priv)
> > > void i915_driver_shutdown(struct drm_i915_private *i915)
> > > {
> > > disable_rpm_wakeref_asserts(&i915->runtime_pm);
> > > + intel_runtime_pm_disable(&i915->runtime_pm);
> > > + intel_power_domains_disable(i915);
> > >
> > > i915_gem_suspend(i915);
> > >
> > > @@ -1069,7 +1071,10 @@ void i915_driver_shutdown(struct drm_i915_private *i915)
> > > intel_suspend_encoders(i915);
> > > intel_shutdown_encoders(i915);
> > >
> > > + intel_power_domains_driver_remove(i915);
> > > enable_rpm_wakeref_asserts(&i915->runtime_pm);
> > > +
> > > + intel_runtime_pm_driver_release(&i915->runtime_pm);
> > > }
> > >
> > > static bool suspend_to_idle(struct drm_i915_private *dev_priv)
> > > --
> > > 2.25.1
> > >
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx at lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Ville Syrjälä
> Intel
More information about the Intel-gfx
mailing list