intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 3/5] drm/i915: WaInsertNoopAfterBatchEndCommand
Date: Thu, 18 Oct 2012 11:49:52 +0200	[thread overview]
Message-ID: <1350553794-5534-4-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1350553794-5534-1-git-send-email-daniel.vetter@ffwll.ch>

Comment says that this applies to earlier gens, too. Since two more
MI_NOOP's can't hurt that much, I've figured I'll apply this w/a down
to gen2.

v2: Correct the ringbuffer dword count for gen3, spotted by Chris
Wilson.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 984a0c5..38092dc 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -969,7 +969,7 @@ i965_dispatch_execbuffer(struct intel_ring_buffer *ring, u32 offset, u32 length)
 {
 	int ret;
 
-	ret = intel_ring_begin(ring, 2);
+	ret = intel_ring_begin(ring, 4);
 	if (ret)
 		return ret;
 
@@ -978,6 +978,11 @@ i965_dispatch_execbuffer(struct intel_ring_buffer *ring, u32 offset, u32 length)
 			MI_BATCH_GTT |
 			MI_BATCH_NON_SECURE_I965);
 	intel_ring_emit(ring, offset);
+	/* WaInsertNoopAfterBatchEndCommand: Command says to do the same after
+	 * the batchbuffer start command. Unclear whether really required on
+	 * gen3, but better safe than sorry. */
+	intel_ring_emit(ring, MI_NOOP);
+	intel_ring_emit(ring, MI_NOOP);
 	intel_ring_advance(ring);
 
 	return 0;
@@ -996,7 +1001,10 @@ i830_dispatch_execbuffer(struct intel_ring_buffer *ring,
 	intel_ring_emit(ring, MI_BATCH_BUFFER);
 	intel_ring_emit(ring, offset | MI_BATCH_NON_SECURE);
 	intel_ring_emit(ring, offset + len - 8);
-	intel_ring_emit(ring, 0);
+	/* WaInsertNoopAfterBatchEndCommand: Command says to do the same after
+	 * the batchbuffer start command. Unclear whether really required on
+	 * gen2, but better safe than sorry. */
+	intel_ring_emit(ring, MI_NOOP);
 	intel_ring_advance(ring);
 
 	return 0;
@@ -1008,12 +1016,16 @@ i915_dispatch_execbuffer(struct intel_ring_buffer *ring,
 {
 	int ret;
 
-	ret = intel_ring_begin(ring, 2);
+	ret = intel_ring_begin(ring, 4);
 	if (ret)
 		return ret;
 
 	intel_ring_emit(ring, MI_BATCH_BUFFER_START | MI_BATCH_GTT);
 	intel_ring_emit(ring, offset | MI_BATCH_NON_SECURE);
+	/* WaInsertNoopAfterBatchEndCommand: Command says to do the same after
+	 * the batchbuffer start command. */
+	intel_ring_emit(ring, MI_NOOP);
+	intel_ring_emit(ring, MI_NOOP);
 	intel_ring_advance(ring);
 
 	return 0;
-- 
1.7.10.4

  parent reply	other threads:[~2012-10-18  9:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18  9:49 [PATCH 0/5] pile of ilk related workarounds Daniel Vetter
2012-10-18  9:49 ` [PATCH 1/5] drm/i915: implement WaIssueDummyWriteToWakupFromRC6 Daniel Vetter
2012-10-18 11:10   ` Chris Wilson
2012-10-18 12:14     ` [PATCH] drm/i915: implement WaIssueDummyWriteToWakeupFromRC6 Daniel Vetter
2012-10-18 12:16     ` Daniel Vetter
2012-10-18 11:17   ` [PATCH 1/5] drm/i915: implement WaIssueDummyWriteToWakupFromRC6 Chris Wilson
2012-10-18 11:21     ` Daniel Vetter
2012-10-18 11:25   ` Lespiau, Damien
2012-10-18  9:49 ` [PATCH 2/5] drm/i915: implement WaDisableRenderCachePipelinedFlush Daniel Vetter
2012-10-18 11:21   ` Chris Wilson
2012-10-29 21:33     ` Daniel Vetter
2012-10-18  9:49 ` Daniel Vetter [this message]
2012-10-18 11:24   ` [PATCH 3/5] drm/i915: WaInsertNoopAfterBatchEndCommand Chris Wilson
2012-10-18 12:19     ` [PATCH] " Daniel Vetter
2012-10-18  9:49 ` [PATCH 4/5] drm/i915: implement WaDisableSpriteDestColorKey Daniel Vetter
2012-10-18 11:32   ` Chris Wilson
2012-10-18  9:49 ` [PATCH 5/5] drm/i915: document a few more already implemented ilk w/as Daniel Vetter

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=1350553794-5534-4-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).