diff options
author | John Harrison <[email protected]> | 2022-11-02 12:21:08 -0700 |
---|---|---|
committer | John Harrison <[email protected]> | 2022-11-04 13:45:44 -0700 |
commit | de51de9672a17e242ebe3727b5e6ec0f2b4c1ab4 (patch) | |
tree | 296a62f7efd8d0f7dd0caf06d01361328ffb13b7 | |
parent | cc2e0cf0ad47db7f51283e5c9bd2212a994ad527 (diff) |
drm/i915/guc: Properly initialise kernel contexts
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 <[email protected]>
Reviewed-by: Daniele Ceraolo Spurio <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 4dbdac8002e3..8fbc36356460 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -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); } |