Commit 6c82c752 authored by Daniele Ceraolo Spurio's avatar Daniele Ceraolo Spurio Committed by John Harrison

drm/i915/guc: Don't send policy update for child contexts.

The GuC FW applies the parent context policy to all the children,
so individual updates to the children are not supported and we
should not send them.

Note that sending the message did not have any functional consequences,
because the GuC just drops it and logs an error; since we were trying
to set the child policy to match the parent anyway the message being
dropped was not a problem.
Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <john.c.harrison@intel.com>
Reviewed-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220728003339.2361010-1-daniele.ceraolospurio@intel.com
parent dd9d3cbe
...@@ -2420,7 +2420,6 @@ static int guc_context_policy_init_v70(struct intel_context *ce, bool loop) ...@@ -2420,7 +2420,6 @@ static int guc_context_policy_init_v70(struct intel_context *ce, bool loop)
struct context_policy policy; struct context_policy policy;
u32 execution_quantum; u32 execution_quantum;
u32 preemption_timeout; u32 preemption_timeout;
bool missing = false;
unsigned long flags; unsigned long flags;
int ret; int ret;
...@@ -2438,32 +2437,9 @@ static int guc_context_policy_init_v70(struct intel_context *ce, bool loop) ...@@ -2438,32 +2437,9 @@ static int guc_context_policy_init_v70(struct intel_context *ce, bool loop)
__guc_context_policy_add_preempt_to_idle(&policy, 1); __guc_context_policy_add_preempt_to_idle(&policy, 1);
ret = __guc_context_set_context_policies(guc, &policy, loop); ret = __guc_context_set_context_policies(guc, &policy, loop);
missing = ret != 0;
if (!missing && intel_context_is_parent(ce)) {
struct intel_context *child;
for_each_child(ce, child) {
__guc_context_policy_start_klv(&policy, child->guc_id.id);
if (engine->flags & I915_ENGINE_WANT_FORCED_PREEMPTION)
__guc_context_policy_add_preempt_to_idle(&policy, 1);
child->guc_state.prio = ce->guc_state.prio;
__guc_context_policy_add_priority(&policy, ce->guc_state.prio);
__guc_context_policy_add_execution_quantum(&policy, execution_quantum);
__guc_context_policy_add_preemption_timeout(&policy, preemption_timeout);
ret = __guc_context_set_context_policies(guc, &policy, loop);
if (ret) {
missing = true;
break;
}
}
}
spin_lock_irqsave(&ce->guc_state.lock, flags); spin_lock_irqsave(&ce->guc_state.lock, flags);
if (missing) if (ret != 0)
set_context_policy_required(ce); set_context_policy_required(ce);
else else
clr_context_policy_required(ce); clr_context_policy_required(ce);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment