[Intel-gfx] [PATCH 1/5] drm/i915/guc: Rename _setup() to _load()

Chris Wilson chris at chris-wilson.co.uk
Fri Dec 16 12:47:13 UTC 2016


On Fri, Dec 16, 2016 at 12:47:26PM +0100, Arkadiusz Hiler wrote:
> On Thu, Dec 15, 2016 at 03:57:01PM +0000, Chris Wilson wrote:
> > On Thu, Dec 15, 2016 at 04:47:04PM +0100, Arkadiusz Hiler wrote:
> > > GuC historically has two "startup" functions called _init() and _setup()
> > > 
> > > Then HuC came with it's _init() and _load().
> > > 
> > > To make naming more consistent this commit renames intel_guc_setup() to
> > > intel_guc_load() as it it seams more fitting (it's in intel_guc_loader.c
> > > after all).
> > 
> > Or init_hw as that is the initialisation phase it is called from. 
> > -Chris
> 
> Since it's intel_guc_loader.c I somehow prefer _load() here.
> 
> But intel_uc_load() which, is introduced with the series and call
> intel_guc_load() can be renamed to intel_uc_init_hw()
> 
> What do you think?

We want to push the "phase verb" as far as it makes sense, especially
along the chain i.e. driver -> subsystem -> subsubsystem -> ...

Once we are in the handler, it should use the right functions named
appropriate. I still think carrying the phase verb as far as possible is
important (more important say for init_early) as that carries the
information about the rest of the driver state and the limitations we
must keep in mind. Good taste should prevail ofc; the actual work must
be done by sensibly named functions.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list