All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915: Make LRC pinning own a reference to the context
Date: Wed, 20 Jan 2016 13:50:13 +0000	[thread overview]
Message-ID: <20160120135013.GA16147@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <1453297257-4707-2-git-send-email-tvrtko.ursulin@linux.intel.com>

On Wed, Jan 20, 2016 at 01:40:56PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Will simplify the following fix and sounds logical.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Nick Hoath <nicholas.hoath@intel.com>
> ---
>  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@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-01-20 13:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 13:40 [PATCH 1/3] drm/i915: Make LRC (un)pinning work on context and engine Tvrtko Ursulin
2016-01-20 13:40 ` [PATCH 2/3] drm/i915: Make LRC pinning own a reference to the context Tvrtko Ursulin
2016-01-20 13:50   ` Chris Wilson [this message]
2016-01-20 13:40 ` [PATCH 3/3] drm/i915: Fix premature LRC unpin in GuC mode Tvrtko Ursulin
2016-01-20 13:55   ` Chris Wilson
2016-01-20 14:06     ` Tvrtko Ursulin
2016-01-20 14:18       ` Chris Wilson
2016-01-20 14:50         ` [PATCH v2] " Tvrtko Ursulin
2016-01-20 15:18           ` Chris Wilson
2016-01-20 14:21       ` [PATCH 3/3] " Nick Hoath
2016-01-20 13:55 ` [PATCH 1/3] drm/i915: Make LRC (un)pinning work on context and engine Chris Wilson
2016-01-20 14:50 ` ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2016-01-21 10:10 [PATCH v2 1/3] " Tvrtko Ursulin
2016-01-21 10:10 ` [PATCH 2/3] drm/i915: Make LRC pinning own a reference to the context Tvrtko Ursulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160120135013.GA16147@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.