public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Daniel, Thomas" <thomas.daniel@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/i915: Balance context pinning on reset	cleanup
Date: Wed, 21 Jan 2015 09:31:14 +0100	[thread overview]
Message-ID: <20150121083113.GC10113@phenom.ffwll.local> (raw)
In-Reply-To: <BFEE8FEC12424048AF1805991D65FA91197296A6@irsmsx105.ger.corp.intel.com>

On Tue, Jan 20, 2015 at 04:14:58PM +0000, Daniel, Thomas wrote:
> > -----Original Message-----
> > From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf
> > Of Mika Kuoppala
> > Sent: Tuesday, January 13, 2015 9:32 AM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH 1/2] drm/i915: Balance context pinning on reset
> > cleanup
> > 
> > We pin when we submit to execlist queue. Balance the pinning when the
> > submitted queue is cleaned on reset.
> > 
> > Cc: Dave Gordon <david.s.gordon@intel.com>
> > Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_gem.c  | 4 ++++
> > drivers/gpu/drm/i915/intel_lrc.c | 1 +
> >  2 files changed, 5 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c
> > b/drivers/gpu/drm/i915/i915_gem.c index 6c40365..68ea67d 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -2657,6 +2657,10 @@ static void i915_gem_reset_ring_cleanup(struct
> > drm_i915_private *dev_priv,
> >  				execlist_link);
> >  		list_del(&submit_req->execlist_link);
> >  		intel_runtime_pm_put(dev_priv);
> > +
> > +		if (submit_req->ctx != ring->default_context)
> > +			intel_lr_context_unpin(ring, submit_req->ctx);
> > +
> >  		i915_gem_context_unreference(submit_req->ctx);
> >  		kfree(submit_req);
> >  	}
> > diff --git a/drivers/gpu/drm/i915/intel_lrc.c
> > b/drivers/gpu/drm/i915/intel_lrc.c
> > index 7670a0f..56a3625 100644
> > --- a/drivers/gpu/drm/i915/intel_lrc.c
> > +++ b/drivers/gpu/drm/i915/intel_lrc.c
> > @@ -1774,6 +1774,7 @@ void intel_lr_context_free(struct intel_context
> > *ctx)
> >  				intel_unpin_ringbuffer_obj(ringbuf);
> >  				i915_gem_object_ggtt_unpin(ctx_obj);
> >  			}
> > +			WARN_ON(ctx->engine[ring->id].unpin_count);
> >  			intel_destroy_ringbuffer_obj(ringbuf);
> >  			kfree(ringbuf);
> >  			drm_gem_object_unreference(&ctx_obj->base);
> 
> Assuming this still patch still applies after Nick Hoath's recent changes,
> Reviewed-by: Thomas Daniel <thomas.daniel@intel.com>

Both merged, thanks for patches&review.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2015-01-21  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13  9:32 [PATCH 1/2] drm/i915: Balance context pinning on reset cleanup Mika Kuoppala
2015-01-13  9:32 ` [PATCH 2/2] drm/i915: Rename unpin_count to pin_count Mika Kuoppala
2015-01-13 15:12   ` shuang.he
2015-01-20 16:16   ` Daniel, Thomas
2015-01-20 16:14 ` [PATCH 1/2] drm/i915: Balance context pinning on reset cleanup Daniel, Thomas
2015-01-21  8:31   ` Daniel Vetter [this message]

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=20150121083113.GC10113@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.daniel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox