@@ -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)
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(-)