[Intel-gfx] [PATCH v5] drm/i915/execlists: Move WA_TAIL_DWORDS to callee

Chris Wilson chris at chris-wilson.co.uk
Thu Feb 25 10:05:52 UTC 2016


On Wed, Feb 24, 2016 at 10:02:58AM +0000, Dave Gordon wrote:
> @@ -907,7 +942,8 @@ int intel_logical_ring_reserve_space(struct drm_i915_gem_request *request)
>  	 * adding any commands to it then there might not actually be
>  	 * sufficient room for the submission commands.
>  	 */
> -	intel_ring_reserved_space_reserve(request->ringbuf, MIN_SPACE_FOR_ADD_REQUEST);
> +	intel_ring_reserved_space_reserve(request->ringbuf,
> +		MIN_SPACE_FOR_ADD_REQUEST + WA_TAIL_DWORDS(request));

No, no and thrice no. MIN_SPACE_FOR_ADD_REQUEST already has to and does
take this into account. We either make it variable and universally compute
it per-engine/per-gen or keep using the fixed constant that is large enough
for everybody. This code should remain common to all paths until the
duplication is removed.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list