diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2011-06-29 13:26:42 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-06-29 13:32:08 -0400 |
commit | 3e0dc6b01f5301d63046f6deddde2c7f5c57d67a (patch) | |
tree | 9621e6d1a4b85e68d33a40324b0cb05955fc1212 /drivers/gpu/drm | |
parent | 23b2f8bb92feb83127679c53633def32d3108e70 (diff) |
drm/i915: hangcheck disable parameter
Provide a parameter to disable hanghcheck. This is useful mostly for
developers trying to debug known problems, and probably should not be
touched by normal users.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 13 |
4 files changed, 18 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 609358faaa90..b54f7d9b173a 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -70,6 +70,9 @@ module_param_named(vbt_sdvo_panel_type, i915_vbt_sdvo_panel_type, int, 0600); | |||
70 | static bool i915_try_reset = true; | 70 | static bool i915_try_reset = true; |
71 | module_param_named(reset, i915_try_reset, bool, 0600); | 71 | module_param_named(reset, i915_try_reset, bool, 0600); |
72 | 72 | ||
73 | bool i915_enable_hangcheck = true; | ||
74 | module_param_named(enable_hangcheck, i915_enable_hangcheck, bool, 0644); | ||
75 | |||
73 | static struct drm_driver driver; | 76 | static struct drm_driver driver; |
74 | extern int intel_agp_enabled; | 77 | extern int intel_agp_enabled; |
75 | 78 | ||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 01affb63be29..e0f9ca3e5ff8 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -994,6 +994,7 @@ extern unsigned int i915_panel_use_ssc; | |||
994 | extern int i915_vbt_sdvo_panel_type; | 994 | extern int i915_vbt_sdvo_panel_type; |
995 | extern unsigned int i915_enable_rc6; | 995 | extern unsigned int i915_enable_rc6; |
996 | extern unsigned int i915_enable_fbc; | 996 | extern unsigned int i915_enable_fbc; |
997 | extern bool i915_enable_hangcheck; | ||
997 | 998 | ||
998 | extern int i915_suspend(struct drm_device *dev, pm_message_t state); | 999 | extern int i915_suspend(struct drm_device *dev, pm_message_t state); |
999 | extern int i915_resume(struct drm_device *dev); | 1000 | extern int i915_resume(struct drm_device *dev); |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 71cc8a353a78..8b670e7ee404 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1779,8 +1779,11 @@ i915_add_request(struct intel_ring_buffer *ring, | |||
1779 | ring->outstanding_lazy_request = false; | 1779 | ring->outstanding_lazy_request = false; |
1780 | 1780 | ||
1781 | if (!dev_priv->mm.suspended) { | 1781 | if (!dev_priv->mm.suspended) { |
1782 | mod_timer(&dev_priv->hangcheck_timer, | 1782 | if (i915_enable_hangcheck) { |
1783 | jiffies + msecs_to_jiffies(DRM_I915_HANGCHECK_PERIOD)); | 1783 | mod_timer(&dev_priv->hangcheck_timer, |
1784 | jiffies + | ||
1785 | msecs_to_jiffies(DRM_I915_HANGCHECK_PERIOD)); | ||
1786 | } | ||
1784 | if (was_empty) | 1787 | if (was_empty) |
1785 | queue_delayed_work(dev_priv->wq, | 1788 | queue_delayed_work(dev_priv->wq, |
1786 | &dev_priv->mm.retire_work, HZ); | 1789 | &dev_priv->mm.retire_work, HZ); |
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index ae2b49969b99..0b0de5239ad5 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -361,10 +361,12 @@ static void notify_ring(struct drm_device *dev, | |||
361 | 361 | ||
362 | ring->irq_seqno = seqno; | 362 | ring->irq_seqno = seqno; |
363 | wake_up_all(&ring->irq_queue); | 363 | wake_up_all(&ring->irq_queue); |
364 | 364 | if (i915_enable_hangcheck) { | |
365 | dev_priv->hangcheck_count = 0; | 365 | dev_priv->hangcheck_count = 0; |
366 | mod_timer(&dev_priv->hangcheck_timer, | 366 | mod_timer(&dev_priv->hangcheck_timer, |
367 | jiffies + msecs_to_jiffies(DRM_I915_HANGCHECK_PERIOD)); | 367 | jiffies + |
368 | msecs_to_jiffies(DRM_I915_HANGCHECK_PERIOD)); | ||
369 | } | ||
368 | } | 370 | } |
369 | 371 | ||
370 | static void gen6_pm_rps_work(struct work_struct *work) | 372 | static void gen6_pm_rps_work(struct work_struct *work) |
@@ -1664,6 +1666,9 @@ void i915_hangcheck_elapsed(unsigned long data) | |||
1664 | uint32_t acthd, instdone, instdone1; | 1666 | uint32_t acthd, instdone, instdone1; |
1665 | bool err = false; | 1667 | bool err = false; |
1666 | 1668 | ||
1669 | if (!i915_enable_hangcheck) | ||
1670 | return; | ||
1671 | |||
1667 | /* If all work is done then ACTHD clearly hasn't advanced. */ | 1672 | /* If all work is done then ACTHD clearly hasn't advanced. */ |
1668 | if (i915_hangcheck_ring_idle(&dev_priv->ring[RCS], &err) && | 1673 | if (i915_hangcheck_ring_idle(&dev_priv->ring[RCS], &err) && |
1669 | i915_hangcheck_ring_idle(&dev_priv->ring[VCS], &err) && | 1674 | i915_hangcheck_ring_idle(&dev_priv->ring[VCS], &err) && |