Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/3] Break VM to rq reference loop
@ 2022-06-14 18:43 Ramalingam C
  2022-06-14 18:43 ` [Intel-gfx] [PATCH 1/3] drm/i915: Do not access rq->engine without a reference Ramalingam C
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Ramalingam C @ 2022-06-14 18:43 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Hellstrom Thomas, Matthew Auld

The i915_request holds a reference to intel_context, which in
turn holds a reference on the VM. But the dma-resv update for
VM_BIND feature would require VM hold a reference to the
i915_request through dma-resv fences of VM_PRIVATE objects
(which share a per VM dma-resv object).

Thus, we have a circular reference pattern causing the VM
reference to never reach 0, hence VM is not destroyed.

Break this by reverting the below patch which is making the
i915_request to hold a reference on intel_context.
"drm/i915: Hold reference to intel_context over life of i915_request"

This means we can't access rq->engine in i915_fence_get_driver_name()
as user do not hold a reference on rq->engine here. So, instead
store required device private pointer in 'rq->i915' and use it.

Niranjana Vishwanathapura (2):
  drm/i915: Do not access rq->engine without a reference
  Revert "drm/i915: Hold reference to intel_context over life of
    i915_request"

Ramalingam C (1):
  drm/i915: Do not use reserved requests for virtual engines

 drivers/gpu/drm/i915/i915_request.c | 55 ++++++++++++++++++-----------
 drivers/gpu/drm/i915/i915_request.h |  2 ++
 2 files changed, 36 insertions(+), 21 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-06-27 17:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-14 18:43 [Intel-gfx] [PATCH 0/3] Break VM to rq reference loop Ramalingam C
2022-06-14 18:43 ` [Intel-gfx] [PATCH 1/3] drm/i915: Do not access rq->engine without a reference Ramalingam C
2022-06-27 17:09   ` Matthew Brost
2022-06-14 18:43 ` [Intel-gfx] [PATCH 2/3] Revert "drm/i915: Hold reference to intel_context over life of i915_request" Ramalingam C
2022-06-27 17:18   ` Matthew Brost
2022-06-14 18:43 ` [Intel-gfx] [PATCH 3/3] drm/i915: Do not use reserved requests for virtual engines Ramalingam C
2022-06-27 17:18   ` Matthew Brost
2022-06-27 18:01     ` Ramalingam C
2022-06-14 19:56 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Break VM to rq reference loop Patchwork
2022-06-14 20:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-06-15  6:41 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox