drm/i915: Make request's wait-for-space explicit
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Nov 2017 15:12:04 +0000 (15:12 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Nov 2017 17:12:49 +0000 (17:12 +0000)
commitfd13821219dda093e402c5849e5d4525bb64b4f3
treea562e3a4155bb2079002e2734f74f9ee7133e866
parent24fd018aaeaecdba79f85e2232ca37a412e2754b
drm/i915: Make request's wait-for-space explicit

At the start of building a request, we would wait for roughly enough
space to fit the average request (to reduce the likelihood of having to
wait and abort partway through request construction). To achieve we
would try to begin a 0-length command packet, this just adds extra
confusion so make the wait-for-space explicit, as in the next patch we
want to move it from the backend to the i915_gem_request_alloc() so it
can ensure that the wait-for-space is the first operation in building a
new request.

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/20171115151204.8105-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h