]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Reduce presumption of request ordering for barriers
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Mar 2019 09:36:56 +0000 (09:36 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Mar 2019 10:57:08 +0000 (10:57 +0000)
commit3879459d1c2951aff3e9a4ca74109fa31e82e692
treeec32a5bc5b8c8e3ce3abfb529eb0b5b8365e4ab7
parent2d6886426d4781b93c44b689a8253bed4cffd964
drm/i915: Reduce presumption of request ordering for barriers

Currently we assume that we know the order in which requests run and so
can determine if we need to reissue a switch-to-kernel-context prior to
idling. That assumption does not hold for the future, so instead of
tracking which barriers have been used, simply determine if we have ever
switched away from the kernel context by using the engine and before
idling ensure that all engines that have been used since the last idle
are synchronously switched back to the kernel context for safety (and
else of shrinking memory while idle).

v2: Use intel_engine_mask_t and ALL_ENGINES

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190308093657.8640-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_context.h
drivers/gpu/drm/i915/i915_gem_evict.c
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/selftests/i915_gem_context.c
drivers/gpu/drm/i915/selftests/igt_flush_test.c
drivers/gpu/drm/i915/selftests/mock_gem_device.c