OSDN Git Service

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)
commit604a8f6f1e33ed53529a117baec92d28e746a601
tree7a78a1f771b13dcb07e6b3f9dfd30a40f94074ee
parent76e70087d360fdbe97f24c205d585ada04126e5f
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