linux/drivers/gpu/drm/i915/selftests
Chris Wilson 22b7a426bb drm/i915/execlists: Preempt-to-busy
When using a global seqno, we required a precise stop-the-workd event to
handle preemption and unwind the global seqno counter. To accomplish
this, we would preempt to a special out-of-band context and wait for the
machine to report that it was idle. Given an idle machine, we could very
precisely see which requests had completed and which we needed to feed
back into the run queue.

However, now that we have scrapped the global seqno, we no longer need
to precisely unwind the global counter and only track requests by their
per-context seqno. This allows us to loosely unwind inflight requests
while scheduling a preemption, with the enormous caveat that the
requests we put back on the run queue are still _inflight_ (until the
preemption request is complete). This makes request tracking much more
messy, as at any point then we can see a completed request that we
believe is not currently scheduled for execution. We also have to be
careful not to rewind RING_TAIL past RING_HEAD on preempting to the
running context, and for this we use a semaphore to prevent completion
of the request before continuing.

To accomplish this feat, we change how we track requests scheduled to
the HW. Instead of appending our requests onto a single list as we
submit, we track each submission to ELSP as its own block. Then upon
receiving the CS preemption event, we promote the pending block to the
inflight block (discarding what was previously being tracked). As normal
CS completion events arrive, we then remove stale entries from the
inflight tracker.

v2: Be a tinge paranoid and ensure we flush the write into the HWS page
for the GPU semaphore to pick in a timely fashion.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190620142052.19311-1-chris@chris-wilson.co.uk
2019-06-20 16:52:36 +01:00
..
i915_active.c drm/i915: update rpm_get/put to use the rpm structure 2019-06-14 15:58:33 +01:00
i915_gem_evict.c drm/i915/selftests: Flush live_evict 2019-06-18 18:12:13 +01:00
i915_gem_gtt.c drm/i915: update rpm_get/put to use the rpm structure 2019-06-14 15:58:33 +01:00
i915_gem.c drm/i915: update with_intel_runtime_pm to use the rpm structure 2019-06-14 15:58:33 +01:00
i915_live_selftests.h drm/i915: add in-kernel blitter client 2019-05-30 12:01:44 +01:00
i915_mock_selftests.h drm/i915: Move phys objects to its own file 2019-05-28 12:45:29 +01:00
i915_random.c drm/i915: Share per-timeline HWSP using a slab suballocator 2019-01-28 19:07:06 +00:00
i915_random.h drm/i915: Share per-timeline HWSP using a slab suballocator 2019-01-28 19:07:06 +00:00
i915_request.c drm/i915/execlists: Preempt-to-busy 2019-06-20 16:52:36 +01:00
i915_selftest.c drm/i915/selftests: Upgrade printing test/subtest name to pr_info 2019-03-06 11:36:36 +00:00
i915_sw_fence.c drm/i915/selftests: Disable preemption while setting up fence-timers 2019-03-14 11:47:06 +00:00
i915_syncmap.c
i915_timeline.c drm/i915: Stop passing I915_WAIT_LOCKED to i915_request_wait() 2019-06-19 12:58:38 +01:00
i915_vma.c drm/i915: update rpm_get/put to use the rpm structure 2019-06-14 15:58:33 +01:00
igt_atomic.h drm/i915/selftests: Split igt_atomic_reset testcase 2019-05-23 21:53:26 +01:00
igt_flush_test.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
igt_flush_test.h
igt_live_test.c drm/i915: Drop fake breadcrumb irq 2019-01-29 21:45:30 +00:00
igt_live_test.h drm/i915/selftests: Refactor common live_test framework 2019-01-22 13:01:20 +00:00
igt_reset.c drm/i915/selftests: Split igt_atomic_reset testcase 2019-05-23 21:53:26 +01:00
igt_reset.h drm/i915/selftests: Split igt_atomic_reset testcase 2019-05-23 21:53:26 +01:00
igt_spinner.c drm/i915: Pull kref into i915_address_space 2019-06-11 11:44:24 +01:00
igt_spinner.h drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
igt_wedge_me.h
intel_guc.c drm/i915: update rpm_get/put to use the rpm structure 2019-06-14 15:58:33 +01:00
intel_uncore.c drm/i915: update rpm_get/put to use the rpm structure 2019-06-14 15:58:33 +01:00
lib_sw_fence.c drm/i915/execlists: Virtual engine bonding 2019-05-22 08:40:46 +01:00
lib_sw_fence.h drm/i915: Replace global breadcrumbs with per-context interrupt tracking 2019-01-29 21:45:22 +00:00
mock_drm.c
mock_drm.h
mock_gem_device.c drm/i915: Keep contexts pinned until after the next kernel context switch 2019-06-14 19:03:32 +01:00
mock_gem_device.h
mock_gtt.c drm/i915: Rename i915_hw_ppgtt to i915_ppgtt 2019-06-11 11:44:32 +01:00
mock_gtt.h drm/i915: Rename i915_hw_ppgtt to i915_ppgtt 2019-06-11 11:44:32 +01:00
mock_request.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
mock_request.h drm/i915: Make request allocation caches global 2019-02-28 11:07:56 +00:00
mock_timeline.c drm/i915: Replace engine->timeline with a plain list 2019-06-14 19:03:40 +01:00
mock_timeline.h
mock_uncore.c drm/i915: use vfuncs for reg_read/write_fw_domains 2019-06-20 16:34:52 +01:00
mock_uncore.h drm/i915: make more uncore function work on intel_uncore 2019-03-20 21:12:42 +00:00
scatterlist.c drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00