[Intel-gfx] [PATCH v6 63/64] drm/i915: Move gt_revoke() slightly
Thomas Hellström
thomas.hellstrom at linux.intel.com
Mon Jan 18 11:11:07 UTC 2021
On 1/5/21 4:35 PM, Maarten Lankhorst wrote:
> We get a lockdep splat when the reset mutex is held, because it can be
> taken from fence_wait. This conflicts with the mmu notifier we have,
> because we recurse between reset mutex and mmap lock -> mmu notifier.
>
> Remove this recursion by calling revoke_mmaps before taking the lock.
Hmm. Is the mmap se taken from gt_revoke()?
If so, isn't the real problem that the mmap_sem is taken in the
dma_fence critical path (where the reset code sits)?
/Thomas
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_reset.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
> index 9d177297db79..3c0807d9a86e 100644
> --- a/drivers/gpu/drm/i915/gt/intel_reset.c
> +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> @@ -975,8 +975,6 @@ static int do_reset(struct intel_gt *gt, intel_engine_mask_t stalled_mask)
> {
> int err, i;
>
> - gt_revoke(gt);
> -
> err = __intel_gt_reset(gt, ALL_ENGINES);
> for (i = 0; err && i < RESET_MAX_RETRIES; i++) {
> msleep(10 * (i + 1));
> @@ -1031,6 +1029,9 @@ void intel_gt_reset(struct intel_gt *gt,
>
> might_sleep();
> GEM_BUG_ON(!test_bit(I915_RESET_BACKOFF, >->reset.flags));
> +
> + gt_revoke(gt);
> +
> mutex_lock(>->reset.mutex);
>
> /* Clear any previous failed attempts at recovery. Time to try again. */
More information about the Intel-gfx
mailing list