linux/drivers/gpu/drm/i915/selftests
Chris Wilson 79ffac8599 drm/i915: Invert the GEM wakeref hierarchy
In the current scheme, on submitting a request we take a single global
GEM wakeref, which trickles down to wake up all GT power domains. This
is undesirable as we would like to be able to localise our power
management to the available power domains and to remove the global GEM
operations from the heart of the driver. (The intent there is to push
global GEM decisions to the boundary as used by the GEM user interface.)

Now during request construction, each request is responsible via its
logical context to acquire a wakeref on each power domain it intends to
utilize. Currently, each request takes a wakeref on the engine(s) and
the engines themselves take a chipset wakeref. This gives us a
transition on each engine which we can extend if we want to insert more
powermangement control (such as soft rc6). The global GEM operations
that currently require a struct_mutex are reduced to listening to pm
events from the chipset GT wakeref. As we reduce the struct_mutex
requirement, these listeners should evaporate.

Perhaps the biggest immediate change is that this removes the
struct_mutex requirement around GT power management, allowing us greater
flexibility in request construction. Another important knock-on effect,
is that by tracking engine usage, we can insert a switch back to the
kernel context on that engine immediately, avoiding any extra delay or
inserting global synchronisation barriers. This makes tracking when an
engine and its associated contexts are idle much easier -- important for
when we forgo our assumed execution ordering and need idle barriers to
unpin used contexts. In the process, it means we remove a large chunk of
code whose only purpose was to switch back to the kernel context.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-5-chris@chris-wilson.co.uk
2019-04-24 22:26:49 +01:00
..
huge_gem_object.c drm/i915: Make object/vma allocation caches global 2019-02-28 11:08:02 +00:00
huge_gem_object.h
huge_pages.c drm/i915: Create/destroy VM (ppGTT) for use with contexts 2019-03-22 13:12:32 +00:00
i915_active.c drm/i915: Pass intel_context to i915_request_create() 2019-04-24 22:25:35 +01:00
i915_gem_coherency.c drm/i915: Pass intel_context to i915_request_create() 2019-04-24 22:25:35 +01:00
i915_gem_context.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
i915_gem_dmabuf.c drm/i915: Flush pages on acquisition 2019-03-21 17:28:12 +00:00
i915_gem_evict.c drm/i915/selftests: Fix an IS_ERR() vs NULL check 2019-03-26 14:53:01 +00:00
i915_gem_gtt.c drm/i915: Create/destroy VM (ppGTT) for use with contexts 2019-03-22 13:12:32 +00:00
i915_gem_object.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
i915_gem.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
i915_live_selftests.h drm/i915: Generalise GPU activity tracking 2019-02-05 17:12:00 +00:00
i915_mock_selftests.h drm/i915: Replace global breadcrumbs with per-context interrupt tracking 2019-01-29 21:45:22 +00: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: Pass intel_context to i915_request_create() 2019-04-24 22:25:35 +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: Pass intel_context to i915_request_create() 2019-04-24 22:25:35 +01:00
i915_vma.c drm/i915/selftests: Move local mock_ggtt allocations to the heap 2019-02-17 21:07:46 +00:00
igt_flush_test.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +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: Move GraphicsTechnology files under gt/ 2019-04-24 21:01:46 +01:00
igt_reset.h drm/i915/selftests: Add tests for GT and engine workaround verification 2018-12-04 12:23:19 +00:00
igt_spinner.c drm/i915: Flush pages on acquisition 2019-03-21 17:28:12 +00:00
igt_spinner.h drm/i915: Move GraphicsTechnology files under gt/ 2019-04-24 21:01:46 +01:00
igt_wedge_me.h
intel_guc.c drm/i915: Store the BIT(engine->id) as the engine's mask 2019-03-05 18:19:50 +00:00
intel_uncore.c drm/i915/selftests: Mark live_forcewake_ops as unreliable 2019-04-08 19:15:05 +01:00
lib_sw_fence.c drm/i915: Replace global breadcrumbs with per-context interrupt tracking 2019-01-29 21:45:22 +00:00
lib_sw_fence.h drm/i915: Replace global breadcrumbs with per-context interrupt tracking 2019-01-29 21:45:22 +00:00
mock_context.c drm/i915: Allow contexts to share a single timeline across all engines 2019-03-22 13:12:38 +00:00
mock_context.h
mock_dmabuf.c
mock_dmabuf.h
mock_drm.c
mock_drm.h
mock_gem_device.c drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
mock_gem_device.h
mock_gem_object.h
mock_gtt.c drm/i915/selftests: Create a clean GGTT for vma/gtt selftesting 2019-01-22 12:50:39 +00:00
mock_gtt.h drm/i915/selftests: Create a clean GGTT for vma/gtt selftesting 2019-01-22 12:50:39 +00:00
mock_request.c drm/i915: Move GraphicsTechnology files under gt/ 2019-04-24 21:01:46 +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: Consolidate the timeline->barrier 2019-04-08 17:04:12 +01:00
mock_timeline.h
mock_uncore.c drm/i915: switch uncore mmio funcs to use intel_uncore 2019-03-26 20:16:13 +00:00
mock_uncore.h drm/i915: make more uncore function work on intel_uncore 2019-03-20 21:12:42 +00:00
scatterlist.c