[Intel-gfx] [PATCH] drm/i915: Name the anonymous per-engine context struct

Chris Wilson chris at chris-wilson.co.uk
Fri Mar 18 15:14:14 UTC 2016


On Fri, Mar 18, 2016 at 03:00:56PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> This anonymous struct was causing a good amount of overly
> verbose code. Also, if we name it and cache the pointer locally
> when there are multiple accesses to it, not only the code is
> more readable, but the compiler manages to generate smaller
> binary.
> 
> Along the way I also shortened access to dev_priv and eliminated
> some unused variables and cached some where I spotted the
> opportunity.
> 
> Name for the structure, intel_context_engine, and the local
> variable name were borrowed from a similar patch by Chris Wilson.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>

Looks like a patch I've been maintaining for an eon, and I think Mika
once did a similar thing.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

If I'm far enough away from it to be impartial?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list