All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Workaround to avoid lite restore with HEAD==TAIL
Date: Fri, 10 Apr 2015 11:11:16 +0100	[thread overview]
Message-ID: <20150410101116.GH20904@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20150410100108.GH6092@phenom.ffwll.local>

On Fri, Apr 10, 2015 at 12:01:08PM +0200, Daniel Vetter wrote:
> On Fri, Apr 10, 2015 at 10:32:33AM +0100, Michel Thierry wrote:
> > ---
> >  drivers/gpu/drm/i915/i915_gem.c  | 11 +++++++++++
> >  drivers/gpu/drm/i915/intel_lrc.c | 29 +++++++++++++++++++++++++++++
> >  2 files changed, 40 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index ca522c9..a44070a 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -2382,6 +2382,17 @@ int __i915_add_request(struct intel_engine_cs *ring,
> >  	request->head = request_start;
> >  	request->tail = intel_ring_get_tail(ringbuf);
> >  
> > +	if (i915.enable_execlists &&
> > +	    (IS_GEN8(ring->dev) || IS_GEN9(ring->dev))) {
> > +		/*
> > +		 * Here we add two extra NOOPs as padding to avoid
> > +		 * lite restore of a context with HEAD==TAIL.
> > +		 */
> > +		intel_logical_ring_emit(ringbuf, MI_NOOP);
> > +		intel_logical_ring_emit(ringbuf, MI_NOOP);
> > +		intel_logical_ring_advance(ringbuf);
> > +	}

Move this to gen8_emit_request() and remove the permanent overallocation
in ring_begin. The tail pointer adjustment can then also be localised.
-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:[~2015-04-10 10:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10  9:32 [PATCH] drm/i915: Workaround to avoid lite restore with HEAD==TAIL Michel Thierry
2015-04-10 10:01 ` Daniel Vetter
2015-04-10 10:11   ` Chris Wilson [this message]
2015-04-10 10:14   ` Michel Thierry
2015-04-14  6:08 ` shuang.he
2015-04-14 15:41 ` [PATCH v2] " Michel Thierry
2015-04-15  6:49   ` Chris Wilson
2015-04-15 19:04   ` shuang.he
2015-04-15 16:17 ` [PATCH v3] " Michel Thierry
2015-04-15 16:40   ` Chris Wilson
2015-04-15 17:08     ` Michel Thierry
2015-04-16  9:29   ` shuang.he
2015-04-15 17:11 ` [PATCH v4] " Michel Thierry
2015-04-15 17:19   ` Chris Wilson
2015-04-23 21:20     ` Jani Nikula
2015-04-16 14:07   ` shuang.he

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=20150410101116.GH20904@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.