On Wed, Jan 20, 2016 at 01:40:56PM +0000, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > > Will simplify the following fix and sounds logical. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > Cc: Nick Hoath <nicholas.hoath@xxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_lrc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c > index 48ca51a36948..5c3f57fed916 100644 > --- a/drivers/gpu/drm/i915/intel_lrc.c > +++ b/drivers/gpu/drm/i915/intel_lrc.c > @@ -1105,6 +1105,7 @@ static int intel_lr_context_pin(struct intel_context *ctx, > ret = intel_lr_context_do_pin(ctx, engine); > if (ret) > goto reset_pin_count; > + i915_gem_context_reference(ctx); > } > return ret; > > @@ -1130,6 +1131,7 @@ void intel_lr_context_unpin(struct intel_context *ctx, > ctx->engine[engine->id].lrc_vma = NULL; > ctx->engine[engine->id].lrc_desc = 0; > ctx->engine[engine->id].lrc_reg_state = NULL; > + i915_gem_context_unreference(ctx); I would appreciate some whitespace, especially here, since this is important to be aware of -- we may need to consider that this is the last reference and so have it stand out. Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx