All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: Handle i915_active_fence_set() with the same fence
@ 2019-11-06 15:48 ` Chris Wilson
  0 siblings, 0 replies; 30+ messages in thread
From: Chris Wilson @ 2019-11-06 15:48 UTC (permalink / raw)
  To: intel-gfx

If the caller wants to overwrite the currently tracked fence, with
itself, as far as the tracking is concerned it is a no-op, so simply
allow it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_active.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
index 207383dda84d..cde984744f20 100644
--- a/drivers/gpu/drm/i915/i915_active.c
+++ b/drivers/gpu/drm/i915/i915_active.c
@@ -759,7 +759,9 @@ __i915_active_fence_set(struct i915_active_fence *active,
 
 	prev = rcu_dereference_protected(active->fence, active_is_held(active));
 	if (prev) {
-		GEM_BUG_ON(prev == fence);
+		if (unlikely(prev == fence))
+			goto unlock;
+
 		spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING);
 		__list_del_entry(&active->cb.node);
 		spin_unlock(prev->lock); /* serialise with prev->cb_list */
@@ -781,6 +783,7 @@ __i915_active_fence_set(struct i915_active_fence *active,
 	rcu_assign_pointer(active->fence, fence);
 	list_add_tail(&active->cb.node, &fence->cb_list);
 
+unlock:
 	spin_unlock_irqrestore(fence->lock, flags);
 
 	return prev;
-- 
2.24.0

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

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

end of thread, other threads:[~2019-11-08 16:14 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 15:48 [PATCH 1/3] drm/i915: Handle i915_active_fence_set() with the same fence Chris Wilson
2019-11-06 15:48 ` [Intel-gfx] " Chris Wilson
2019-11-06 15:48 ` [PATCH 2/3] drm/i915: Drop inspection of execbuf flags during evict Chris Wilson
2019-11-06 15:48   ` [Intel-gfx] " Chris Wilson
2019-11-08  9:54   ` Daniel Vetter
2019-11-08  9:54     ` [Intel-gfx] " Daniel Vetter
2019-11-08 10:11     ` Chris Wilson
2019-11-08 10:11       ` [Intel-gfx] " Chris Wilson
2019-11-08 10:20       ` Daniel Vetter
2019-11-08 10:20         ` [Intel-gfx] " Daniel Vetter
2019-11-08 10:40         ` Chris Wilson
2019-11-08 10:40           ` [Intel-gfx] " Chris Wilson
2019-11-08 16:06           ` Daniel Vetter
2019-11-08 16:06             ` [Intel-gfx] " Daniel Vetter
2019-11-06 15:48 ` [PATCH 3/3] drm/i915/gem: Extract transient execbuf flags from i915_vma Chris Wilson
2019-11-06 15:48   ` [Intel-gfx] " Chris Wilson
2019-11-08  9:53   ` Daniel Vetter
2019-11-08  9:53     ` [Intel-gfx] " Daniel Vetter
2019-11-08 10:05     ` Chris Wilson
2019-11-08 10:05       ` [Intel-gfx] " Chris Wilson
2019-11-08 16:13       ` Daniel Vetter
2019-11-08 16:13         ` [Intel-gfx] " Daniel Vetter
2019-11-06 19:22 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Handle i915_active_fence_set() with the same fence Patchwork
2019-11-06 19:22   ` [Intel-gfx] " Patchwork
2019-11-08 10:37 ` [PATCH 1/3] " Tvrtko Ursulin
2019-11-08 10:37   ` [Intel-gfx] " Tvrtko Ursulin
2019-11-08 10:42   ` Chris Wilson
2019-11-08 10:42     ` [Intel-gfx] " Chris Wilson
2019-11-08 12:00 ` ✗ Fi.CI.IGT: failure for series starting with [1/3] " Patchwork
2019-11-08 12:00   ` [Intel-gfx] " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.