Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19098018 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Check for no-op priority changes first



In all likelihood, the priority and node are already in the CPU cache
and by checking them first, we can avoid having to chase the
*request->hwsp for the current breadcrumb.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190513120102.29660-3-chris@chris-wilson.co.uk
parent 52c76fb1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -200,10 +200,10 @@ static void __i915_schedule(struct i915_sched_node *node,
	lockdep_assert_held(&schedule_lock);
	GEM_BUG_ON(prio == I915_PRIORITY_INVALID);

	if (node_signaled(node))
	if (prio <= READ_ONCE(node->attr.priority))
		return;

	if (prio <= READ_ONCE(node->attr.priority))
	if (node_signaled(node))
		return;

	stack.signaler = node;