[Intel-gfx] [PATCH 04/12] drm/i915/execlists: Refactor CSB state machine
Chris Wilson
chris at chris-wilson.co.uk
Mon Jul 1 13:50:15 UTC 2019
Quoting Mika Kuoppala (2019-07-01 12:49:48)
> Chris Wilson <chris at chris-wilson.co.uk> writes:
>
> > Daniele pointed out that the CSB status information will change with
> > Tigerlake and suggested that we could rearrange our state machine to
> > hide the differences in generation. gcc also prefers the explicit state
> > machine, so make it so:
> >
> > process_csb 1980 1967 -13
> >
> > Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
> > Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/gt/intel_lrc.c | 64 ++++++++++++++++++++---------
> > 1 file changed, 44 insertions(+), 20 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> > index 471e134de186..953b3938a85f 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> > @@ -1279,6 +1279,30 @@ reset_in_progress(const struct intel_engine_execlists *execlists)
> > return unlikely(!__tasklet_is_enabled(&execlists->tasklet));
> > }
> >
> > +enum csb_step {
> > + CSB_NOP,
> > + CSB_PROMOTE,
> > + CSB_PREEMPT,
> > + CSB_COMPLETE,
> > +};
> > +
> > +static inline enum csb_step
> > +csb_parse(const struct intel_engine_execlists *execlists, const u32 *csb)
> > +{
> > + unsigned int status = *csb;
>
> Could be const u32 aswell (stylistic).
No need to specify here, local register is fine, so left it as natural.
> Just makes me ponder why you want to read csb in here
> and not in the callsite.
Whatever gcc prefers when there is multiple csb_parsers. :)
-Chris
More information about the Intel-gfx
mailing list