Skip to content

Commit

Permalink
drm/i915: Force the GPU reset upon wedging
Browse files Browse the repository at this point in the history
When declaring the GPU wedged, we do need to hit the GPU with the reset
hammer so that its state matches our presumed state during cleanup. If
the reset fails, it fails, and we may be unhappy but wedged. However, if
we are testing our wedge/unwedged handling, the desync carries over into
the next test and promptly explodes.

References: https://bugs.freedesktop.org/show_bug.cgi?id=106702
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190208153708.20023-3-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Feb 8, 2019
1 parent 2caffbf commit 0eb6a3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/i915/i915_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,6 @@ typedef int (*reset_func)(struct drm_i915_private *,

static reset_func intel_get_gpu_reset(struct drm_i915_private *i915)
{
if (!i915_modparams.reset)
return NULL;

if (INTEL_GEN(i915) >= 8)
return gen8_reset_engines;
else if (INTEL_GEN(i915) >= 6)
Expand Down Expand Up @@ -599,6 +596,9 @@ bool intel_has_gpu_reset(struct drm_i915_private *i915)
if (USES_GUC(i915))
return false;

if (!i915_modparams.reset)
return NULL;

return intel_get_gpu_reset(i915);
}

Expand Down Expand Up @@ -824,7 +824,7 @@ void i915_gem_set_wedged(struct drm_i915_private *i915)
reset_prepare_engine(engine);

/* Even if the GPU reset fails, it should still stop the engines */
if (INTEL_GEN(i915) >= 5)
if (!INTEL_INFO(i915)->gpu_reset_clobbers_display)
intel_gpu_reset(i915, ALL_ENGINES);

for_each_engine(engine, i915, id) {
Expand Down

0 comments on commit 0eb6a3f

Please sign in to comment.