[Intel-gfx] [PATCH 7/8] drm/i915/guc: Simplify intel_guc_init_hw()
Arkadiusz Hiler
arkadiusz.hiler at intel.com
Tue Feb 21 13:56:46 UTC 2017
On Fri, Feb 17, 2017 at 03:03:04PM +0100, Michal Wajdeczko wrote:
> On Fri, Feb 17, 2017 at 02:05:56PM +0100, Arkadiusz Hiler wrote:
> > Current version of intel_guc_init_hw() does a lot:
> > - cares about submission
> > - loads huc
> > - implement WA
> >
> > This change offloads some of the logic to intel_uc_load(), which now
> > cares about the above.
> >
> > v2: rename guc_hw_reset and fix typo in define name (M. Wajdeczko)
> >
> > Cc: Anusha Srivatsa <anusha.srivatsa at intel.com>
> > Cc: Michal Winiarski <michal.winiarski at intel.com>
> > Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> > Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
> > ---
>
> <SNIP>
>
> > diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
> > index ef9dc72..2bb49b7 100644
> > --- a/drivers/gpu/drm/i915/intel_uc.c
> > +++ b/drivers/gpu/drm/i915/intel_uc.c
> > @@ -29,6 +29,25 @@
> > static void uc_fetch_fw(struct drm_i915_private *dev_priv,
> > struct intel_uc_fw *uc_fw);
> >
> > +static int guc_hw_reset(struct drm_i915_private *dev_priv)
>
> This function looks like and is guc specific.
It seems to restarts both guc and huc hardware (including memory)
nulling the state of both.
I've inlined intel_guc_reset() (as it's the only place it's used) and
named it __uc_reset_hw() for next revision.
> Maybe we should revisit the idea of having separate intel_guc.c file
> that will hold only guc specific functions. And use intel_uc.c file
> only for functions that are common across Guc, Huc...
That's what intel_guc_loader.c pretty much is nowadays. It can be
renamed along the road.
--
Cheers,
Arek
More information about the Intel-gfx
mailing list