@@ -3273,11 +3273,13 @@ static bool can_preempt(struct intel_engine_cs *engine)
return engine->class != RENDER_CLASS;
}
-static void kick_execlists(const struct i915_request *rq, int prio)
+static void kick_execlists(const struct i915_request *rq,
+ const struct i915_sched_attr *attr)
{
struct intel_engine_cs *engine = rq->engine;
struct i915_sched_engine *sched_engine = engine->sched_engine;
const struct i915_request *inflight;
+ const int prio = attr->priority;
/*
* We only need to kick the tasklet once for the high priority
@@ -3520,9 +3520,10 @@ static void guc_init_breadcrumbs(struct intel_engine_cs *engine)
}
static void guc_bump_inflight_request_prio(struct i915_request *rq,
- int prio)
+ const struct i915_sched_attr *attr)
{
struct intel_context *ce = request_to_scheduling_context(rq);
+ const int prio = attr->priority;
u8 new_guc_prio = map_i915_prio_to_guc_prio(prio);
/* Short circuit function */
@@ -255,7 +255,7 @@ static void __i915_schedule(struct i915_sched_node *node,
/* Must be called before changing the nodes priority */
if (sched_engine->bump_inflight_request_prio)
- sched_engine->bump_inflight_request_prio(from, prio);
+ sched_engine->bump_inflight_request_prio(from, attr);
WRITE_ONCE(node->attr.priority, prio);
@@ -280,7 +280,7 @@ static void __i915_schedule(struct i915_sched_node *node,
/* Defer (tasklet) submission until after all of our updates. */
if (sched_engine->kick_backend)
- sched_engine->kick_backend(node_to_request(node), prio);
+ sched_engine->kick_backend(node_to_request(node), attr);
}
spin_unlock(&sched_engine->lock);
@@ -177,13 +177,13 @@ struct i915_sched_engine {
* @kick_backend: kick backend after a request's priority has changed
*/
void (*kick_backend)(const struct i915_request *rq,
- int prio);
+ const struct i915_sched_attr *attr);
/**
* @bump_inflight_request_prio: update priority of an inflight request
*/
void (*bump_inflight_request_prio)(struct i915_request *rq,
- int prio);
+ const struct i915_sched_attr *attr);
/**
* @retire_inflight_request_prio: indicate request is retired to