[Intel-gfx] [PATCH 06/12] drm/i915: Name the inner most per-engine intel_context struct

Chris Wilson chris at chris-wilson.co.uk
Mon May 23 10:17:35 UTC 2016


On Mon, May 23, 2016 at 10:26:39AM +0100, Tvrtko Ursulin wrote:
> >@@ -385,20 +384,18 @@ static void guc_init_ctx_desc(struct intel_guc *guc,
> >  		 * for now who owns a GuC client. But for future owner of GuC
> >  		 * client, need to make sure lrc is pinned prior to enter here.
> >  		 */
> >-		obj = ctx->engine[id].state;
> >-		if (!obj)
> >+		if (!ce->state)
> >  			break;	/* XXX: continue? */
> >
> >-		ctx_desc = intel_lr_context_descriptor(ctx, engine);
> >-		lrc->context_desc = (u32)ctx_desc;
> >+		lrc->context_desc = lower_32_bits(ce->lrc_desc);
> 
> Could have kept use of intel_lr_context_descriptor for better separation.

I was leaning the other way, since the code doesn't want
intel_lr_context_descriptor() just happens to want to reuse some of the
bits e.g. engine->ctx_desc_template | lrca

i.e. lrc->context_desc != ce->lrc_desc and I would prefer it to be
clarified as to exactly what the GuC expects.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list