[3/3] drm/i915: Treat weak-dependencies as bidirectional when applying priorities
diff mbox series

Message ID 20200507082124.1673-3-chris@chris-wilson.co.uk
State New
Headers show
Series
  • [1/3] drm/i915: Mark concurrent submissions with a weak-dependency
Related show

Commit Message

Chris Wilson May 7, 2020, 8:21 a.m. UTC
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.

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

Comments

Tvrtko Ursulin May 7, 2020, 2:58 p.m. UTC | #1
On 07/05/2020 09:21, Chris Wilson wrote:
> 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.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_scheduler.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c
> index 6e2d4190099f..7194fbfcaa49 100644
> --- a/drivers/gpu/drm/i915/i915_scheduler.c
> +++ b/drivers/gpu/drm/i915/i915_scheduler.c
> @@ -291,6 +291,12 @@ static void __i915_schedule(struct i915_sched_node *node,
>   			if (prio > READ_ONCE(p->signaler->attr.priority))
>   				list_move_tail(&p->dfs_link, &dfs);
>   		}
> +
> +		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);
> +		}
>   	}
>   
>   	/*
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c
index 6e2d4190099f..7194fbfcaa49 100644
--- a/drivers/gpu/drm/i915/i915_scheduler.c
+++ b/drivers/gpu/drm/i915/i915_scheduler.c
@@ -291,6 +291,12 @@  static void __i915_schedule(struct i915_sched_node *node,
 			if (prio > READ_ONCE(p->signaler->attr.priority))
 				list_move_tail(&p->dfs_link, &dfs);
 		}
+
+		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);
+		}
 	}
 
 	/*