diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 27630842bdccef91abf1b79046ba457a6a5b5185..dbe0f88ad3d007ecc5e2dbb1a04e8c1e46f24fc7 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -770,6 +770,7 @@ static int gen6_do_reset(struct drm_device *dev, u8 flags) static int intel_gpu_reset(struct drm_device *dev, u8 flags) { + struct drm_i915_private *dev_priv = dev->dev_private; int ret = -ENODEV; switch (INTEL_INFO(dev)->gen) { @@ -788,6 +789,17 @@ static int intel_gpu_reset(struct drm_device *dev, u8 flags) break; } + /* Also reset the gpu hangman. */ + if (dev_priv->stop_rings) { + DRM_DEBUG("Simulated gpu hang, resetting stop_rings\n"); + dev_priv->stop_rings = 0; + if (ret == -ENODEV) { + DRM_ERROR("Reset not implemented, but ignoring " + "error for simulated gpu hangs\n"); + ret = 0; + } + } + return ret; }