From patchwork Fri Jun 3 19:20:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Anholt X-Patchwork-Id: 848112 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p53JM7um011256 for ; Fri, 3 Jun 2011 19:22:28 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 38A359E7E3 for ; Fri, 3 Jun 2011 12:22:07 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from annarchy.freedesktop.org (annarchy.freedesktop.org [131.252.210.176]) by gabe.freedesktop.org (Postfix) with ESMTP id D8BF89E78D; Fri, 3 Jun 2011 12:20:26 -0700 (PDT) Received: from pollan.anholt.net (annarchy.freedesktop.org [127.0.0.1]) by annarchy.freedesktop.org (Postfix) with ESMTP id 50370130052; Fri, 3 Jun 2011 12:20:26 -0700 (PDT) Received: by pollan.anholt.net (Postfix, from userid 1000) id EF69D4017B4; Fri, 3 Jun 2011 12:20:23 -0700 (PDT) From: Eric Anholt To: intel-gfx@lists.freedesktop.org Date: Fri, 3 Jun 2011 12:20:22 -0700 Message-Id: <1307128822-9709-5-git-send-email-eric@anholt.net> X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1307128822-9709-1-git-send-email-eric@anholt.net> References: <1307128822-9709-1-git-send-email-eric@anholt.net> Subject: [Intel-gfx] [PATCH 4/4] drm/i915: Try removing the forcewake get/put around the fifo counting. 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 (demeter2.kernel.org [140.211.167.43]); Fri, 03 Jun 2011 19:22:28 +0000 (UTC) This reintroduces the IRQ misses, with 2 events in 1874 runs. Signed-off-by: Eric Anholt --- drivers/gpu/drm/i915/i915_drv.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index eabf82c..5444032 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -383,18 +383,24 @@ void __gen6_gt_wait_for_fifo(struct drm_i915_private *dev_priv) void intel_posting_read(struct drm_i915_private *dev_priv, uint32_t reg) { - int ret; + u32 fifo; + int loop = 5000; if (dev_priv->info->gen < 6) { (void)I915_READ_NOTRACE(reg); return; } - gen6_gt_force_wake_get(dev_priv); - ret = wait_for(I915_READ_NOTRACE(GT_FIFO_FREE_ENTRIES) == 0x3f, 500); - gen6_gt_force_wake_put(dev_priv); + if (!I915_READ_NOTRACE(GT_FIFO_FREE_ENTRIES)) + printk("it got 0\n"); + + fifo = I915_READ_NOTRACE(GT_FIFO_FREE_ENTRIES); + while (fifo != 0x3f && --loop) { + udelay(10); + fifo = I915_READ_NOTRACE(GT_FIFO_FREE_ENTRIES); + } - WARN_ON_ONCE(ret != 0); + WARN_ON_ONCE(loop == 0); } static int i915_drm_freeze(struct drm_device *dev)