[Intel-gfx] [PATCH 03/19] drm/i915: Store a i915 backpointer from engine, and use it

Chris Wilson chris at chris-wilson.co.uk
Thu May 5 11:26:32 UTC 2016


On Thu, May 05, 2016 at 12:15:40PM +0100, Tvrtko Ursulin wrote:
> 
> On 05/05/16 10:15, Chris Wilson wrote:
> >@@ -3186,7 +3181,7 @@ __i915_gem_object_sync(struct drm_i915_gem_object *obj,
> >  	if (i915_gem_request_completed(from_req, true))
> >  		return 0;
> >
> >-	if (!i915_semaphore_is_enabled(obj->base.dev)) {
> >+	if (!i915_semaphore_is_enabled(to_i915(obj->base.dev))) {
> >  		struct drm_i915_private *i915 = to_i915(obj->base.dev);
> 
> Maybe worth pulling up the local to function level since there are
> now two lines next to each other doing the same dereferencing?

This one gets changed quite a few times in forthcoming patches, the
double pointer chasing is indeed killed but here I opted for less churn
for myself.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list