Re: [PATCH] drm/i915: Move the context descriptor to an inline helper

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

 



On Tue, 2017-09-12 at 22:49 +0100, 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@xxxxxxxxxxxxxxxxxx>

<SNIP>

> @@ -78,8 +79,14 @@ struct drm_i915_private;
>  struct i915_gem_context;
>  
>  void intel_lr_context_resume(struct drm_i915_private *dev_priv);
> -uint64_t intel_lr_context_descriptor(struct i915_gem_context *ctx,
> -				     struct intel_engine_cs *engine);
> +
> +static inline uint64_t

There was a perfect opportunity for s/uint64_t/u64/ here.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
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