Re: [PATCH 2/2] drm/i915/opregion: Rename init/fini functions to register/unregister

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 23, 2016 at 05:42:49PM +0300, Jani Nikula wrote:
> On Mon, 23 May 2016, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> 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.nikula@xxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux