]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/i915: Measure the required reserved size for request emission
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 25 Jan 2019 10:05:20 +0000 (10:05 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 25 Jan 2019 11:19:39 +0000 (11:19 +0000)
commite1a73a54a96e80dc6009e73c9209e4f81ae22285
treecadd51eb146190119e6fcd60916b77a2accc96a3
parent8e525cb4a622148fbe30134ee3a1a34ad839a43a
drm/i915: Measure the required reserved size for request emission

Instead of tediously and fragilely counting up the number of dwords
required to emit the breadcrumb to seal a request, fake a request and
measure it automatically once during engine setup.

The downside is that this requires a fair amount of mocking to create a
proper breadcrumb. Still, should be less error prone in future as the
breadcrumb size fluctuates!

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