[Intel-gfx] [PATCH 3/3] drm/i915: Do not use reserved requests for virtual engines
Matthew Brost
matthew.brost at intel.com
Mon Jun 27 17:18:59 UTC 2022
On Wed, Jun 15, 2022 at 12:13:48AM +0530, Ramalingam C wrote:
> Do not use reserved requests for virtual engines as this is only
> needed for kernel contexts.
>
> Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
> Suggested-by: Matthew Brost <matthew.brost at intel.com>
With the patch squashed into the previous patch:
Reviewed-by: Matthew Brost <matthew.brost at intel.com>
> ---
> drivers/gpu/drm/i915/i915_request.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index c71905d8e154..f0392b053bca 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -135,6 +135,8 @@ static void i915_fence_release(struct dma_fence *fence)
>
> /*
> * Keep one request on each engine for reserved use under mempressure
> + * do not use with virtual engines as this really is only needed for
> + * kernel contexts.
> *
> * We do not hold a reference to the engine here and so have to be
> * very careful in what rq->engine we poke. The virtual engine is
> @@ -164,7 +166,8 @@ static void i915_fence_release(struct dma_fence *fence)
> * know that if the rq->execution_mask is a single bit, rq->engine
> * can be a physical engine with the exact corresponding mask.
> */
> - if (is_power_of_2(rq->execution_mask) &&
> + if (!intel_engine_is_virtual(rq->engine) &&
> + is_power_of_2(rq->execution_mask) &&
> !cmpxchg(&rq->engine->request_pool, NULL, rq))
> return;
>
> --
> 2.20.1
>
More information about the Intel-gfx
mailing list