drm/i915: Trim error mask to known engines
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 16 Mar 2018 21:49:59 +0000 (21:49 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 19 Mar 2018 17:08:43 +0000 (17:08 +0000)
For the convenience of userspace passing in an arbitrary reset mask,
remove unknown engines from the set of engines that are to be reset.
This means that we always follow a per-engine reset with a full-device
reset when userspace writes -1 into debugfs/i915_wedged.

Reported-by: Michał Winiarski <michal.winiarski@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180316215001.12391-1-chris@chris-wilson.co.uk
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
drivers/gpu/drm/i915/i915_irq.c

index 828f3104488c485fed5df3287bf2fd70620ca8f2..44eef355e12c148557e66deae9b0d25f7d80d117 100644 (file)
@@ -2985,6 +2985,7 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
         */
        intel_runtime_pm_get(dev_priv);
 
+       engine_mask &= INTEL_INFO(dev_priv)->ring_mask;
        i915_capture_error_state(dev_priv, engine_mask, error_msg);
        i915_clear_error_registers(dev_priv);