Re: [PATCH 1/3] drm/i915: Retire the VMA's fence tracker before unbinding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 20/06/2017 13:43, Chris Wilson wrote:
Since we may track unfenced access (GPU access to the vma that
explicitly requires no fence), vma->last_fence may be set without any

Is this the gen < 4 code path? There is no actual fence in this case?

attached fence (vma->fence) and so will not be flushed when we call
i915_vma_put_fence(). Since we stopped doing a full retire of the
activity trackers for unbind, we need to explicitly retire each tracker.

Fixes: b0decaf75bd9 ("drm/i915: Track active vma requests")
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>
---
  drivers/gpu/drm/i915/i915_vma.c | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 532c709febbd..1cfe137cdc32 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -672,6 +672,11 @@ int i915_vma_unbind(struct i915_vma *vma)
  				break;
  		}
+ if (!ret) {
+			ret = i915_gem_active_retire(&vma->last_fence,
+						     &vma->vm->i915->drm.struct_mutex);
+		}
+
  		__i915_vma_unpin(vma);
  		if (ret)
  			return ret;


Looks safe anyway, but I'd like to understand how exactly it happens and if it is still possible after patch 2/3.

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux