[Intel-gfx] [PATCH] drm/i915: Verify power domains after enabling them

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 17 12:58:50 UTC 2018


Quoting Imre Deak (2018-08-17 13:53:06)
> On Fri, Aug 17, 2018 at 01:32:24PM +0100, Chris Wilson wrote:
> > Quoting Imre Deak (2018-08-17 13:26:13)
> > > After
> > > commit 2cd9a689e97b ("Refactor intel_display_set_init_power() logic")
> > > it makes more sense to check the power domain/well refcounts after
> > > enabling the power domains functionality. Before that it's guaranteed
> > > that most power wells (in the INIT domain) will have a reference held,
> > > so not an interesting state.
> > 
> > Indeed, that is true. But it is also used to check that we do acquire
> > the powerwells on init.
> 
> Yes, intel_power_domains_enable() is called both during init and system
> resume, after HW readout and acquiring the needed power wells.
> 
> > I think it would sensible to include a verify state at the end of
> > power_domains_init_hw, or do you think the sync_hw makes that
> > superfluous?
> 
> We have all power wells in the INIT domain enabled there, so I thought
> it's less interesting, but yes I can also add the check to init_hw,
> fini_hw, enable/disable and suspend/resume steps.

Yup, agree on the less interesting, but still useful to nip errors in
the bud where we require a powerwell but failed to bring the HW up. And
the pm state change is so infrequent (albeit suspend/resume are latency
sensitive for some environments) that a bit of sanity checking is
worthwhile. On the other hand, if it does take over 1ms to verify the
state, perhaps not for resume. ;)
-Chris


More information about the Intel-gfx mailing list