[PATCH 4/5] drm/i915: Do not (un)pin contexts in i915_requests
Matthew Brost
matthew.brost at intel.com
Wed Jun 30 03:54:16 UTC 2021
On Tue, Jun 29, 2021 at 04:33:51PM +0200, Maarten Lankhorst wrote:
> Should have been handled by the i915_active embedded in there.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_request.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index c5989c0b83d3..5f5a3ba7e8d8 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -424,7 +424,7 @@ bool i915_request_retire(struct i915_request *rq)
> __list_del_entry(&rq->link); /* poison neither prev/next (RCU walks) */
>
> intel_context_exit(rq->context);
> - intel_context_unpin(rq->context);
> + i915_active_release(&rq->context->active);
Seems to break the balance between pinning and unpinning in the request
code. Can you explain this a bit more? Does i915_active_release call
intel_context_unpin underneath? Also for guc submission we do some
tricks with the pin in count in intel_context_unpin to call an async
schedule disable function which this might break. IMO we likely should
hold off on this patch for now and sync together to make a plan to move
forward.
Matt
>
> free_capture_list(rq);
> i915_sched_node_fini(&rq->sched);
> @@ -932,7 +932,7 @@ __i915_request_create(struct intel_context *ce, gfp_t gfp)
> might_alloc(gfp);
>
> /* Check that the caller provided an already pinned context */
> - __intel_context_pin(ce);
> + __i915_active_acquire(&ce->active);
>
> /*
> * Beware: Dragons be flying overhead.
> @@ -1052,7 +1052,7 @@ __i915_request_create(struct intel_context *ce, gfp_t gfp)
> err_free:
> kmem_cache_free(global.slab_requests, rq);
> err_unreserve:
> - intel_context_unpin(ce);
> + i915_active_release(&ce->active);
> return ERR_PTR(ret);
> }
>
> --
> 2.31.0
>
> _______________________________________________
> Intel-gfx-trybot mailing list
> Intel-gfx-trybot at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx-trybot
More information about the Intel-gfx-trybot
mailing list