[Intel-gfx] [PATCH 4/9] drm/i915: Remove redundant trailing request flush

Chris Wilson chris at chris-wilson.co.uk
Wed Dec 19 16:43:47 UTC 2018


Quoting Chris Wilson (2018-12-19 14:57:42)
> @@ -616,9 +612,13 @@ i915_request_alloc(struct intel_engine_cs *engine, struct i915_gem_context *ctx)
>          * i915_request_add() call can't fail. Note that the reserve may need
>          * to be redone if the request is not actually submitted straight
>          * away, e.g. because a GPU scheduler has deferred it.
> +        *
> +        * Note that due to how we add reserved_space to intel_ring_begin()
> +        * we need to double our request to ensure that if we need to wrap
> +        * around inside i915_request_add() there is sufficient space at
> +        * the beginning of the ring as well.
>          */
> -       rq->reserved_space = MIN_SPACE_FOR_ADD_REQUEST;
> -       GEM_BUG_ON(rq->reserved_space < engine->emit_breadcrumb_sz);
> +       rq->reserved_space = 2 * engine->emit_breadcrumb_sz;

Oh. emit_breadcrumb_sz is in dwords, reserved_space is in bytes.
-Chris


More information about the Intel-gfx mailing list