]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/gt: Warn about the hidden i915_vma_pin in timeline_get_seqno
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 3 Feb 2020 09:41:49 +0000 (09:41 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 3 Feb 2020 11:27:17 +0000 (11:27 +0000)
On seqno rollover, we need to allocate ourselves a new cacheline. This
might incur grabbing a new page and pinning it into the GGTT, with some
rather unfortunate lockdep implications.

To avoid a mutex, and more specifically pinning in the GGTT from inside
the kernel context being used to flush the GGTT in emergencies, we will
likely need to lift the next-cacheline allocation to a pre-reservation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200203094152.4150550-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_timeline.c

index 465f87b659011ad36186d58092f774bcbdca51cd..54e1e55f3c81619dd7f8809e5d3a9cfcc2740c41 100644 (file)
@@ -406,6 +406,8 @@ __intel_timeline_get_seqno(struct intel_timeline *tl,
        void *vaddr;
        int err;
 
+       might_lock(&tl->gt->ggtt->vm.mutex);
+
        /*
         * If there is an outstanding GPU reference to this cacheline,
         * such as it being sampled by a HW semaphore on another timeline,