mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 06:01:53 +02:00
drm/i915: Skip error capture when wedged on init
Trying to capture uninitialised engines when we wedged on init ends in tears. Skip that together with uC capture, since failure to initialise the latter can actually be one of the reasons for wedging on init. v2: * Use i915_disable_error_state when wedging on init/fini. v3: * Handle mock tests. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> # v1 Link: https://patchwork.freedesktop.org/patch/msgid/20211111130634.266098-1-tvrtko.ursulin@linux.intel.com
This commit is contained in:
parent
fac73543ff
commit
9a7fc95271
|
|
@ -1448,6 +1448,7 @@ void intel_gt_set_wedged_on_init(struct intel_gt *gt)
|
|||
BUILD_BUG_ON(I915_RESET_ENGINE + I915_NUM_ENGINES >
|
||||
I915_WEDGED_ON_INIT);
|
||||
intel_gt_set_wedged(gt);
|
||||
i915_disable_error_state(gt->i915, -ENODEV);
|
||||
set_bit(I915_WEDGED_ON_INIT, >->reset.flags);
|
||||
|
||||
/* Wedged on init is non-recoverable */
|
||||
|
|
@ -1457,6 +1458,7 @@ void intel_gt_set_wedged_on_init(struct intel_gt *gt)
|
|||
void intel_gt_set_wedged_on_fini(struct intel_gt *gt)
|
||||
{
|
||||
intel_gt_set_wedged(gt);
|
||||
i915_disable_error_state(gt->i915, -ENODEV);
|
||||
set_bit(I915_WEDGED_ON_FINI, >->reset.flags);
|
||||
intel_gt_retire_requests(gt); /* cleanup any wedged requests */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,6 +177,8 @@ struct drm_i915_private *mock_gem_device(void)
|
|||
|
||||
mock_uncore_init(&i915->uncore, i915);
|
||||
|
||||
spin_lock_init(&i915->gpu_error.lock);
|
||||
|
||||
i915_gem_init__mm(i915);
|
||||
intel_gt_init_early(&i915->gt, i915);
|
||||
atomic_inc(&i915->gt.wakeref.count); /* disable; no hw support */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user