Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 4/4] drm/i915: Try removing the forcewake get/put around the fifo counting.
Date: Fri,  3 Jun 2011 12:20:22 -0700	[thread overview]
Message-ID: <1307128822-9709-5-git-send-email-eric@anholt.net> (raw)
In-Reply-To: <1307128822-9709-1-git-send-email-eric@anholt.net>

This reintroduces the IRQ misses, with 2 events in 1874 runs.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 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)
-- 
1.7.5.1

  parent reply	other threads:[~2011-06-03 19:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 19:20 WIP POSTING_READ fix series Eric Anholt
2011-06-03 19:20 ` [PATCH 1/4] drm/i915: Control gen6 ring interrupts through a single mask field Eric Anholt
2011-06-03 19:20 ` [PATCH 2/4] drm/i915: Move the forcewake refcounting to a spinlock Eric Anholt
2011-06-03 19:20 ` [PATCH 3/4] drm/i915: Fix missed IRQs on gen6 Eric Anholt
2011-06-03 19:20 ` Eric Anholt [this message]
2011-06-03 21:05 ` WIP POSTING_READ fix series Jesse Barnes

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=1307128822-9709-5-git-send-email-eric@anholt.net \
    --to=eric@anholt.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
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