[Intel-gfx] [PATCH] drm/i915: Move the context descriptor to an inline helper
Chris Wilson
chris at chris-wilson.co.uk
Wed Sep 13 09:39:36 UTC 2017
Quoting Oscar Mateo (2017-09-12 23:50:08)
>
>
> On 09/12/2017 02:49 PM, Chris Wilson wrote:
> > The context descriptor is stored inside the per-engine context state, as
> > we only need to compute it once and access it frequently. However,
> > currently only intel_lrc.c has easy access, but i915_guc_submission.c
> > would like to frequently read it as well, and more so only ever needs
> > the lower 32bits. Make it an inline as the compiler should be able to
> > retrieve the value in less instructions than it takes to do the function
> > call:
> >
> > add/remove: 0/1 grow/shrink: 1/0 up/down: 8/-45 (-37)
> > function old new delta
> > i915_guc_submit 621 629 +8
> > intel_lr_context_descriptor 45 - -45
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
> > drivers/gpu/drm/i915/intel_lrc.c | 6 ------
> > drivers/gpu/drm/i915/intel_lrc.h | 11 +++++++++--
> > 2 files changed, 9 insertions(+), 8 deletions(-)
>
> Reviewed-by: Oscar Mateo <oscar.mateo at intel.com>
Thanks for the review, pushed along with your series.
-Chris
More information about the Intel-gfx
mailing list