Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Lister, Ian" <ian.lister@intel.com>
To: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: [RFC 10/13] drm/i915: MI_LOAD_REGISTER_IMM fix
Date: Mon, 16 Dec 2013 16:03:29 +0000	[thread overview]
Message-ID: <1387209807.3445.59.camel@ilister2-linux.isw.intel.com> (raw)

>From 8f392d11c51beb66e01a63af33d90cb0bf01eda4 Mon Sep 17 00:00:00 2001
Message-Id: <8f392d11c51beb66e01a63af33d90cb0bf01eda4.1387201899.git.ian.lister@intel.com>
In-Reply-To: <cover.1387201899.git.ian.lister@intel.com>
References: <cover.1387201899.git.ian.lister@intel.com>
From: ian-lister <ian.lister@intel.com>
Date: Tue, 10 Dec 2013 16:46:51 +0000
Subject: [RFC 10/13] drm/i915: MI_LOAD_REGISTER_IMM fix

There are comments in i915_reg.h that suggest that an MI_LOAD_REGISTER_IMM
should be immediately preceded by a MI_NOOP. Added missing MI_NOOPs to
i915_gen7_sol_offsets.

Signed-off-by: ian-lister <ian.lister@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 885d595..c9d330a 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -937,14 +937,20 @@ i915_reset_gen7_sol_offsets(struct drm_device *dev,
 	if (!IS_GEN7(dev) || ring != &dev_priv->ring[RCS])
 		return 0;
 
-	ret = intel_ring_begin(ring, 4 * 3);
+	ret = intel_ring_begin(ring, 2 + (4 * 4));
 	if (ret)
 		return ret;
 
+	/* Comments in i915_reg.h indicate that a MI_LOAD_REGISTER_IMM
+	* should be preceded by a MI_NOOP */
+	intel_ring_emit(ring, MI_NOOP);
+	intel_ring_emit(ring, MI_NOOP);
+
 	for (i = 0; i < 4; i++) {
 		intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1));
 		intel_ring_emit(ring, GEN7_SO_WRITE_OFFSET(i));
 		intel_ring_emit(ring, 0);
+		intel_ring_emit(ring, MI_NOOP);
 	}
 
 	intel_ring_advance(ring);
-- 
1.8.5.1

                 reply	other threads:[~2013-12-16 16:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1387209807.3445.59.camel@ilister2-linux.isw.intel.com \
    --to=ian.lister@intel.com \
    --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