[Intel-gfx] [PATCH v3 1/3] drm/i915/guc: Use intel_guc_init_misc to hide GuC internals

Chris Wilson chris at chris-wilson.co.uk
Thu Jun 28 21:54:24 UTC 2018


Quoting Michel Thierry (2018-06-28 22:44:43)
> On 6/28/2018 7:15 AM, Michal Wajdeczko wrote:
> > We will add more init steps to misc phase and there is no need
> > to expose them separately for use in uc_init_misc function.
> > 
> > Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> > Cc: Michel Thierry <michel.thierry at intel.com>
> > ---
> >   drivers/gpu/drm/i915/intel_guc.c | 28 ++++++++++++++++++++++++----
> >   drivers/gpu/drm/i915/intel_guc.h |  5 ++---
> >   drivers/gpu/drm/i915/intel_uc.c  |  6 ++----
> >   3 files changed, 28 insertions(+), 11 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c
> > index f651e57..0b06f27 100644
> > --- a/drivers/gpu/drm/i915/intel_guc.c
> > +++ b/drivers/gpu/drm/i915/intel_guc.c
> > @@ -27,6 +27,8 @@
> >   #include "intel_guc_submission.h"
> >   #include "i915_drv.h"
> >   
> > +static void guc_init_ggtt_pin_bias(struct intel_guc *guc);
> > +
> >   static void gen8_guc_raise_irq(struct intel_guc *guc)
> >   {
> >       struct drm_i915_private *dev_priv = guc_to_i915(guc);
> > @@ -73,7 +75,7 @@ void intel_guc_init_early(struct intel_guc *guc)
> >       guc->notify = gen8_guc_raise_irq;
> >   }
> >   
> > -int intel_guc_init_wq(struct intel_guc *guc)
> > +static int guc_init_wq(struct intel_guc *guc)
> >   {
> >       struct drm_i915_private *dev_priv = guc_to_i915(guc);
> >   
> > @@ -124,7 +126,7 @@ int intel_guc_init_wq(struct intel_guc *guc)
> >       return 0;
> >   }
> >   
> > -void intel_guc_fini_wq(struct intel_guc *guc)
> > +static void guc_fini_wq(struct intel_guc *guc)
> >   {
> >       struct drm_i915_private *dev_priv = guc_to_i915(guc);
> >   
> > @@ -135,6 +137,24 @@ void intel_guc_fini_wq(struct intel_guc *guc)
> >       destroy_workqueue(guc->log.relay.flush_wq);
> >   }
> >   
> > +int intel_guc_init_misc(struct intel_guc *guc)
> 
> So the pattern is to name static functions "guc_*" and non-static 
> functions "intel_guc_*"?

Yup, seems to be working out reasonably around the place.
 
> Reviewed-by: Michel Thierry <michel.thierry at intel.com>

Thanks for the review and patches, pushed.
-Chris


More information about the Intel-gfx mailing list