aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-12-23 08:33:15 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2011-01-11 15:36:15 -0500
commitd78cb50baa9177353d6719612b83558a9bf2d59b (patch)
treec67e9b7b5c87fb2dad5ebd8ed181ba0ace10f06e
parenta0fa62d3b6afaa260cad8ccd6944e81ad01c7cf3 (diff)
drm/i915: add 'reset' parameter
When bringing up new hardware, or otherwise experimenting, GPU hangs are a way of life. However, the automatic GPU reset can do more harm than good under these circumstances, as we may wish to capture a full trace for debugging. Based on a patch by Zhenyu Wang. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 872493331988..2913496e8716 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -49,6 +49,9 @@ module_param_named(powersave, i915_powersave, int, 0600);
49unsigned int i915_lvds_downclock = 0; 49unsigned int i915_lvds_downclock = 0;
50module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400); 50module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
51 51
52bool i915_try_reset = true;
53module_param_named(reset, i915_try_reset, bool, 0600);
54
52static struct drm_driver driver; 55static struct drm_driver driver;
53extern int intel_agp_enabled; 56extern int intel_agp_enabled;
54 57
@@ -475,6 +478,9 @@ int i915_reset(struct drm_device *dev, u8 flags)
475 bool need_display = true; 478 bool need_display = true;
476 int ret; 479 int ret;
477 480
481 if (!i915_try_reset)
482 return 0;
483
478 if (!mutex_trylock(&dev->struct_mutex)) 484 if (!mutex_trylock(&dev->struct_mutex))
479 return -EBUSY; 485 return -EBUSY;
480 486