On Mon, May 23, 2016 at 05:42:49PM +0300, Jani Nikula wrote:
> On Mon, 23 May 2016, Chris Wilson <ch...@chris-wilson.co.uk> wrote:
> > Current intel_opregion_init is called during the driver registration
> > phase and intel_opregion_fini from the unregistration phase. Rename the
> > functions show that this is clear from their names. The phases tell us
> > what we expect the existing hw state to be, e.g. whether interrupts are
> > still enabled etc.
> 
> Okay, for the naming per se,
> 
> Reviewed-by: Jani Nikula <jani.nik...@intel.com>
> 
> While not a problem in this patch, the whole init/cleanup of opregion is
> annoyingly asymmetric. You need to call both setup and init to make it
> work, but fini cleans up for both of them. So repeated init/fini pairs
> will fail. The setup also does some initialization that is only needed
> once (like INIT_WORK) so fini is not a complete counter-operation of
> setup+init either.

Yeah, that's was kind of my starting goal to try and make it fit into
the overarching init phases better. Looking at suspend/resume to try and
understand why it didn't just unregister/register (or why it needed to
do the acpi unregister at all) raised too many questions.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to