Skip to content

Break VM to rq reference loop

Ramalingam C dri-devel intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm/i915: Do not access rq->engine without a referencedrivers/gpu/drm/i915/i915_request.c drivers/gpu/drm/i915/i915_request.h+4 -11 reply
2/3Revert "drm/i915: Hold reference to intel_context over life of i915_request"drivers/gpu/drm/i915/i915_request.c+32 -231 reply
3/3drm/i915: Do not use reserved requests for virtual enginesdrivers/gpu/drm/i915/i915_request.c+4 -12 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMatthew Brost
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] Break VM to rq reference loop

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(-)
Signature · 1 line
2.20.1