Do not use reserved requests for virtual engines as this is only needed for kernel contexts.
Signed-off-by: Ramalingam C <ramalinga...@intel.com> Suggested-by: Matthew Brost <matthew.br...@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