Intel-GFX Archive on lore.kernel.org
 help / color / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH] drm/i915: small semaphore fix
Date: Wed, 31 Aug 2011 12:47:22 -0700
Message-ID: <1314820042-6169-1-git-send-email-ben@bwidawsk.net> (raw)

Assertion + unsigned helps catch potential issues.

>From the docs it is hard to tell if the global GTT flag is actually
needed, but it shouldn't hurt.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index c30626e..eb1ab0c 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -315,12 +315,14 @@ static void render_ring_cleanup(struct intel_ring_buffer *ring)
 }
 
 static void
-update_semaphore(struct intel_ring_buffer *ring, int i, u32 seqno)
+update_semaphore(struct intel_ring_buffer *ring, unsigned int i, u32 seqno)
 {
 	struct drm_device *dev = ring->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	int id;
 
+	BUG_ON(IS_GEN6(dev) && i > 1);
+
 	/*
 	 * cs -> 1 = vcs, 0 = bcs
 	 * vcs -> 1 = bcs, 0 = cs,
@@ -332,6 +334,7 @@ update_semaphore(struct intel_ring_buffer *ring, int i, u32 seqno)
 
 	intel_ring_emit(ring,
 			MI_SEMAPHORE_MBOX |
+			MI_SEMAPHORE_GLOBAL_GTT |
 			MI_SEMAPHORE_REGISTER |
 			MI_SEMAPHORE_UPDATE);
 	intel_ring_emit(ring, seqno);
-- 
1.7.6.1

             reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-31 19:47 Ben Widawsky [this message]
2011-09-01 18:03 ` Eric Anholt
2011-09-02  2:51   ` Ben Widawsky
2011-09-02  8:56     ` Chris Wilson
2011-09-02 14:18       ` Ben Widawsky

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=1314820042-6169-1-git-send-email-ben@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --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

Intel-GFX Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/intel-gfx/0 intel-gfx/git/0.git
	git clone --mirror https://lore.kernel.org/intel-gfx/1 intel-gfx/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 intel-gfx intel-gfx/ https://lore.kernel.org/intel-gfx \
		intel-gfx@lists.freedesktop.org
	public-inbox-index intel-gfx

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.intel-gfx


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git