Skip to content

Commit

Permalink
drm/i915/guc: Properly initialise kernel contexts
Browse files Browse the repository at this point in the history
If a context has already been registered prior to first submission
then context init code was not being called. The noticeable effect of
that was the scheduling priority was left at zero (meaning super high
priority) instead of being set to normal. This would occur with
kernel contexts at start of day as they are manually pinned up front
rather than on first submission. So add a call to initialise those
when they are pinned.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221102192109.2492625-2-John.C.Harrison@Intel.com
  • Loading branch information
John Harrison authored and John Harrison committed Nov 4, 2022
1 parent cc2e0cf commit de51de9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
Original file line number Diff line number Diff line change
Expand Up @@ -4111,6 +4111,9 @@ static inline void guc_kernel_context_pin(struct intel_guc *guc,
if (context_guc_id_invalid(ce))
pin_guc_id(guc, ce);

if (!test_bit(CONTEXT_GUC_INIT, &ce->flags))
guc_context_init(ce);

try_context_registration(ce, true);
}

Expand Down

0 comments on commit de51de9

Please sign in to comment.