From patchwork Wed Aug 31 19:47:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 1117592 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7VJlHrR010215 for ; Wed, 31 Aug 2011 19:47:38 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B3A2FA0A6F for ; Wed, 31 Aug 2011 12:47:17 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 79C3C9EC2B for ; Wed, 31 Aug 2011 12:46:58 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by cloud01.chad-versace.us (Postfix) with ESMTP id D9DEF1D421C; Wed, 31 Aug 2011 19:50:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at static.cloud-ips.com X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-100 required=3 tests=[ALL_TRUSTED=-1] autolearn=unavailable Received: from cloud01.chad-versace.us ([127.0.0.1]) by localhost (cloud01.static.cloud-ips.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lEWyRkIDd3ec; Wed, 31 Aug 2011 19:50:12 +0000 (UTC) Received: from localhost.localdomain (c-24-21-207-42.hsd1.or.comcast.net [24.21.207.42]) by cloud01.chad-versace.us (Postfix) with ESMTPSA id 44F0D1D4094; Wed, 31 Aug 2011 19:50:12 +0000 (UTC) From: Ben Widawsky To: intel-gfx@lists.freedesktop.org Date: Wed, 31 Aug 2011 12:47:22 -0700 Message-Id: <1314820042-6169-1-git-send-email-ben@bwidawsk.net> X-Mailer: git-send-email 1.7.6.1 Cc: Ben Widawsky Subject: [Intel-gfx] [PATCH] drm/i915: small semaphore fix X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 31 Aug 2011 19:47:38 +0000 (UTC) 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 --- 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);