]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/lrc: Only enable per-context and per-bb buffers if set
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Sep 2017 13:54:43 +0000 (14:54 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 25 Sep 2017 09:21:21 +0000 (10:21 +0100)
commitf3194c44ce605e71dbed686177de3c6d3526e043
tree7a78a1f771b13dcb07e6b3f9dfd30a40f94074ee
parentd0fa4874168591e5471ddf0f440a2b63d40238a9
drm/i915/lrc: Only enable per-context and per-bb buffers if set

The per-context and per-batch workaround buffers are optional, yet we
tell the GPU to execute them even if they contain no instructions. Doing
so incurs the dispatch latency, which we can avoid if we don't ask the
GPU to execute the no-op buffers. Allow ourselves to skip setup of empty
buffer, and then to only enable non-empty buffers in the context image.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170921135444.27330-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/intel_lrc.c