On 19/08/16 14:39, Chris Wilson wrote:
On Fri, Aug 19, 2016 at 02:31:15PM +0100, Dave Gordon wrote:
@@ -654,6 +680,14 @@ int intel_logical_ring_alloc_request_extras(struct drm_i915_gem_request *request
*/
request->reserved_space += EXECLISTS_REQUEST_SIZE;
+ /*
+ * WA_TAIL_DWORDS is specific to the execlist submission mechanism,
+ * to accommodate some NOOPs at the end of each request, to be used
+ * by a workaround for not being allowed to do lite restore with
+ * HEAD==TAIL (WaIdleLiteRestore). See intel_logical_ring_submit()
+ */
+ request->reserved_space += sizeof(u32) * WA_TAIL_DWORDS(request);
We already have the define that accommodates the tail. Whilst this
remains a fixed size, let's use it appropriately. And when it is
dynamic, we store it in the engine (or context).
-Chris
It might not depend on the engine or context, but on the specifics of
the request. For the other cases, we could find the engine or context
from the request but not vice-versa. Hence we should (pretend to) pass
the request here, because that provides the most generality.
We do have a future use for this, so this is really part of the
prepwork. And Rodrigo specifically asked for the possibility of
variable amounts of padding, as documented in the commit message.
But the main point of this patch is to get rid of the "+WA_TAIL_DWORDS"
in the *_emit_request() functions and instead claim-and-use the space
inside intel_logical_ring_advance(), thus keeping all begin()/advance()
pairs matched and local, as opposed to the current scheme of the space
being claimed in _emit_request() but *used* by _logical_ring_advance().
.Dave.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx