[Intel-gfx] [PATCH 28/57] drm/i915: Wrap i915_request_use_semaphores()
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Thu Feb 4 15:05:43 UTC 2021
On 01/02/2021 08:56, Chris Wilson wrote:
> Wrap the query on whether the backend engine supports us emitting
> semaphores to coordinate multiple requests.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_request.c | 2 +-
> drivers/gpu/drm/i915/i915_request.h | 5 +++++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index 459f727b03cd..e7b4c4bc41a6 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -1141,7 +1141,7 @@ __i915_request_await_execution(struct i915_request *to,
> * immediate execution, and so we must wait until it reaches the
> * active slot.
> */
> - if (intel_engine_has_semaphores(to->engine) &&
> + if (i915_request_use_semaphores(to) &&
> !i915_request_has_initial_breadcrumb(to)) {
> err = __emit_semaphore_wait(to, from, from->fence.seqno - 1);
> if (err < 0)
> diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
> index 8322f308b906..8d9e59e3cdcb 100644
> --- a/drivers/gpu/drm/i915/i915_request.h
> +++ b/drivers/gpu/drm/i915/i915_request.h
> @@ -637,4 +637,9 @@ static inline bool i915_request_is_executing(const struct i915_request *rq)
> return i915_request_get_scheduler(rq)->is_executing(rq);
> }
>
> +static inline bool i915_request_use_semaphores(const struct i915_request *rq)
> +{
> + return intel_engine_has_semaphores(rq->engine);
> +}
> +
> #endif /* I915_REQUEST_H */
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Regards,
Tvrtko
More information about the Intel-gfx
mailing list