drm/i915/gt: Use the kernel_context to measure the breadcrumb size
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Feb 2020 12:58:27 +0000 (12:58 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Feb 2020 17:12:21 +0000 (17:12 +0000)
commitfb5970da1b428b6c0f89441b7d3015328da92cb6
tree48b5087bf5b4246b138435f99b14ff5ec871a250
parent71b7cc601ea7f3ffd95e88f7386e9da8c753a9c8
drm/i915/gt: Use the kernel_context to measure the breadcrumb size

We set up a dummy ring in order to measure the size we require for our
breadcrumb emission, so that we don't have to manually count dwords! We
can pass in the kernel_context to use for this so that if required it is
known for the breadcrumb emitter, and we can reuse some details from the
kernel_context to reduce the number of temporaries we have to mock.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200207125827.2787472-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_engine_cs.c