From patchwork Sat Aug 8 20:34:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gamari X-Patchwork-Id: 40195 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n78KZ9Zo030413 for ; Sat, 8 Aug 2009 20:35:10 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EA88F9E912; Sat, 8 Aug 2009 13:35:08 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from qw-out-1920.google.com (qw-out-1920.google.com [74.125.92.146]) by gabe.freedesktop.org (Postfix) with ESMTP id 98E2A9E782 for ; Sat, 8 Aug 2009 13:35:04 -0700 (PDT) Received: by qw-out-1920.google.com with SMTP id 4so850206qwk.12 for ; Sat, 08 Aug 2009 13:35:04 -0700 (PDT) Received: by 10.224.2.209 with SMTP id 17mr2116911qak.55.1249763704194; Sat, 08 Aug 2009 13:35:04 -0700 (PDT) Received: from localhost.localdomain ([128.164.237.143]) by mx.google.com with ESMTPS id 6sm7346363qwk.34.2009.08.08.13.35.03 (version=SSLv3 cipher=RC4-MD5); Sat, 08 Aug 2009 13:35:03 -0700 (PDT) From: Ben Gamari To: Owain Ainsworth , Jesse Barnes , Chris Wilson , intel-gfx@lists.freedesktop.org Date: Sat, 8 Aug 2009 16:34:42 -0400 Message-Id: <1249763687-5252-4-git-send-email-bgamari.foss@gmail.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1249763687-5252-3-git-send-email-bgamari.foss@gmail.com> References: <1249763687-5252-1-git-send-email-bgamari.foss@gmail.com> <1249763687-5252-2-git-send-email-bgamari.foss@gmail.com> <1249763687-5252-3-git-send-email-bgamari.foss@gmail.com> Subject: [Intel-gfx] [PATCH 3/8] drm/i915: Unmark i915_seqno_passed as static X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 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@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org We'll need it in i915_irq.c for checking whether there are outstanding requests. Also, the function really ought to return a bool, not an int. --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 0090c1c..446d6ac 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -681,6 +681,7 @@ int i915_gem_object_unbind(struct drm_gem_object *obj); void i915_gem_release_mmap(struct drm_gem_object *obj); void i915_gem_lastclose(struct drm_device *dev); uint32_t i915_get_gem_seqno(struct drm_device *dev); +bool i915_seqno_passed(uint32_t seq1, uint32_t seq2); int i915_gem_object_get_fence_reg(struct drm_gem_object *obj); int i915_gem_object_put_fence_reg(struct drm_gem_object *obj); void i915_gem_retire_requests(struct drm_device *dev); diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 04cc326..0171073 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1656,7 +1656,7 @@ out: /** * Returns true if seq1 is later than seq2. */ -static int +bool i915_seqno_passed(uint32_t seq1, uint32_t seq2) { return (int32_t)(seq1 - seq2) >= 0;