Re: [PATCH] drm/i915: Move the common engine cleanup to intel_engine_cs.c

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

 



On Wed, Aug 03, 2016 at 03:52:31PM +0300, Joonas Lahtinen wrote:
> On ke, 2016-08-03 at 13:19 +0100, Chris Wilson wrote:
> > Now that we initialize the state to both legacy and execlists inside
> > intel_engine_cs, we should also clean up that state from the common
> > functions.
> > 
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/intel_engine_cs.c  | 14 ++++++++++++++
> >  drivers/gpu/drm/i915/intel_lrc.c        |  5 +----
> >  drivers/gpu/drm/i915/intel_ringbuffer.c |  4 +---
> >  drivers/gpu/drm/i915/intel_ringbuffer.h |  1 +
> >  4 files changed, 17 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> > index b18f8c9a600c..3e37a122ad73 100644
> > --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> > +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> > @@ -213,3 +213,17 @@ int intel_engine_init_common(struct intel_engine_cs *engine)
> >  
> >  	return intel_engine_init_cmd_parser(engine);
> >  }
> > +
> > +/**
> > + * intel_engines_cleanup_common - cleans up the engine state created by
> > + *                                the common initiailizers.
> > + * @engine: Engine to cleanup.
> > + *
> > + * This cleans up everything created by the common helpers.
> > + */
> > +void intel_engine_cleanup_common(struct intel_engine_cs *engine)
> > +{
> > +	intel_engine_cleanup_cmd_parser(engine);
> > +	intel_engine_fini_breadcrumbs(engine);
> > +	i915_gem_batch_pool_fini(&engine->batch_pool);
> 
> The order of calls is changed, this being the more correct, but having
> faith on CI and;

Yup. Fortunately, no user should ever see these :)
-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