summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2013-02-28 17:01:52 +1100
committerJonathan Gray <jsg@jsg.id.au>2013-02-28 17:01:52 +1100
commit72b29c58a83abaf1e2d67886257f0e959085789d (patch)
treea4dd2b49c0b910eaf69e23ee9c48754fc52e7e69 /sys/dev/pci/drm
parent1a57b40ff35a91b70f3e94b71322ddb087f22a90 (diff)
use the same hangcheck timer interval as linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/i915_drv.h1
-rw-r--r--sys/dev/pci/drm/i915_gem.c3
-rw-r--r--sys/dev/pci/drm/i915_irq.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/i915_drv.h b/sys/dev/pci/drm/i915_drv.h
index 215629ab708..9d50f98fc92 100644
--- a/sys/dev/pci/drm/i915_drv.h
+++ b/sys/dev/pci/drm/i915_drv.h
@@ -718,6 +718,7 @@ struct inteldrm_softc {
} mm;
/* for hangcheck */
+#define DRM_I915_HANGCHECK_PERIOD 1500 /* in ms */
struct timeout hangcheck_timer;
int hangcheck_count;
uint32_t last_acthd[I915_NUM_RINGS];
diff --git a/sys/dev/pci/drm/i915_gem.c b/sys/dev/pci/drm/i915_gem.c
index 7930df5f6ce..e6778fd295b 100644
--- a/sys/dev/pci/drm/i915_gem.c
+++ b/sys/dev/pci/drm/i915_gem.c
@@ -1037,7 +1037,8 @@ i915_add_request(struct intel_ring_buffer *ring,
if (was_empty)
timeout_add_sec(&dev_priv->mm.retire_timer, 1);
/* XXX was_empty? */
- timeout_add_msec(&dev_priv->hangcheck_timer, 750);
+ timeout_add_msec(&dev_priv->hangcheck_timer,
+ DRM_I915_HANGCHECK_PERIOD);
}
if (out_seqno)
diff --git a/sys/dev/pci/drm/i915_irq.c b/sys/dev/pci/drm/i915_irq.c
index 05fd5c16ed5..8f4a86438fb 100644
--- a/sys/dev/pci/drm/i915_irq.c
+++ b/sys/dev/pci/drm/i915_irq.c
@@ -416,7 +416,7 @@ notify_ring(struct drm_device *dev,
wakeup(ring);
dev_priv->hangcheck_count = 0;
- timeout_add_msec(&dev_priv->hangcheck_timer, 750);
+ timeout_add_msec(&dev_priv->hangcheck_timer, DRM_I915_HANGCHECK_PERIOD);
#ifdef notyet
wakeup(&ring->irq_queue);
@@ -1885,7 +1885,7 @@ i915_hangcheck_elapsed(void *arg)
repeat:
/* Reset timer case chip hangs without another request being added */
- timeout_add_msec(&dev_priv->hangcheck_timer, 750);
+ timeout_add_msec(&dev_priv->hangcheck_timer, DRM_I915_HANGCHECK_PERIOD);
}
/* drm_dma.h hooks