[PATCH 2/3] drm/i915: Treat weak-dependencies as bidirectional when applying priorities

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

 



Clients may use a submit-fence as bidirectional bond between two or more
co-operating requests, and so if we bump the priority of one, we wish to
bump the priority of the set.

Testcase: igt/gem_exec_fence/submitN
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_scheduler.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c
index 6e2d4190099f..1c33973dbd20 100644
--- a/drivers/gpu/drm/i915/i915_scheduler.c
+++ b/drivers/gpu/drm/i915/i915_scheduler.c
@@ -291,6 +291,19 @@ static void __i915_schedule(struct i915_sched_node *node,
 			if (prio > READ_ONCE(p->signaler->attr.priority))
 				list_move_tail(&p->dfs_link, &dfs);
 		}
+
+		/*
+		 * A weak dependency is used for submit-fence, which while
+		 * not strongly coupled, we do need to treat as a coordinated
+		 * set of co-operating requests that need to be run
+		 * concurrently. So if one request of that set receives a
+		 * priority boost, they all receive a priority boost.
+		 */
+		list_for_each_entry(p, &node->waiters_list, wait_link) {
+			if (p->flags & I915_DEPENDENCY_WEAK &&
+			    prio > READ_ONCE(p->waiter->attr.priority))
+				list_move_tail(&p->dfs_link, &dfs);
+		}
 	}
 
 	/*
-- 
2.20.1

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



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux