Message ID | 20221102192109.2492625-2-John.C.Harrison@Intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix for two GuC issues | expand |
On 11/2/2022 12:21 PM, John.C.Harrison@Intel.com wrote: > From: John Harrison <John.C.Harrison@Intel.com> > > 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. Does this need a fixes tag? on one side, we were leaving the priority to the wrong value, but on the other there were no actual consequences. Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Daniele > Signed-off-by: John Harrison <John.C.Harrison@Intel.com> > --- > drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 +++ > 1 file changed, 3 insertions(+) > > 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 4ccb29f9ac55c..941613be3b9dd 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); > } >
On 11/4/2022 11:53, Ceraolo Spurio, Daniele wrote: > On 11/2/2022 12:21 PM, John.C.Harrison@Intel.com wrote: >> From: John Harrison <John.C.Harrison@Intel.com> >> >> 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. > > Does this need a fixes tag? on one side, we were leaving the priority > to the wrong value, but on the other there were no actual consequences. > I think that's the point. There was no actual issue, it's just a theoretical problem. So there is nothing to be gained by pushing this as a fix. It it seems like it would be a lot of unnecessary effort to push it all the way back to 5.17. John. > Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> > > Daniele > >> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> >> --- >> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> 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 4ccb29f9ac55c..941613be3b9dd 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); >> } >
On Wed, Nov 02, 2022 at 12:21:08PM -0700, John.C.Harrison@Intel.com wrote: >From: John Harrison <John.C.Harrison@Intel.com> > >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: Lucas De Marchi <lucas.demarchi@intel.com> Lucas De Marchi <lucas.demarchi@intel.com> >--- > drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 +++ > 1 file changed, 3 insertions(+) > >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 4ccb29f9ac55c..941613be3b9dd 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); > } > >-- >2.37.3 >
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 4ccb29f9ac55c..941613be3b9dd 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); }