Hi Michał, On Monday, October 28, 2019 1:57:03 PM CET Michal Wajdeczko wrote: > While processing CSB there is no need to look at GuC submission > settings, just check if engine is configured for execlists mode. > > While today GuC submission is disabled it's settings are still > based on modparam values that might not correctly reflect actual > submission status in case of any fallback. Until that is fully > fixed, use alternate method to confirm that engine really runs in > execlists mode by comparing set_default_submission vfunc. > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > Cc: Janusz Krzysztofik <janusz.krzysztofik@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/gt/intel_lrc.c | 8 +++++++- > drivers/gpu/drm/i915/gt/intel_lrc.h | 2 ++ > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/ intel_lrc.c > index 16340740139d..c0d564b28beb 100644 > --- a/drivers/gpu/drm/i915/gt/intel_lrc.c > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c > @@ -2022,7 +2022,7 @@ static void process_csb(struct intel_engine_cs *engine) > */ > GEM_BUG_ON(!tasklet_is_locked(&execlists->tasklet) && > !reset_in_progress(execlists)); > - GEM_BUG_ON(USES_GUC_SUBMISSION(engine->i915)); > + GEM_BUG_ON(!intel_engine_in_execlists_submission_mode(engine)); > > /* > * Note that csb_write, csb_status may be either in HWSP or mmio. > @@ -4711,6 +4711,12 @@ void intel_lr_context_reset(struct intel_engine_cs *engine, > __execlists_update_reg_state(ce, engine); > } > > +bool intel_engine_in_execlists_submission_mode(struct intel_engine_cs *engine) > +{ > + return engine->set_default_submission == > + intel_execlists_set_default_submission; > +} > + > #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST) > #include "selftest_lrc.c" > #endif > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.h b/drivers/gpu/drm/i915/gt/ intel_lrc.h > index 99dc576a4e25..23dde9083349 100644 > --- a/drivers/gpu/drm/i915/gt/intel_lrc.h > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.h > @@ -145,4 +145,6 @@ struct intel_engine_cs * > intel_virtual_engine_get_sibling(struct intel_engine_cs *engine, > unsigned int sibling); > > +bool intel_engine_in_execlists_submission_mode(struct intel_engine_cs *engine); LGTM. NIT: I'm wondering if the function should be made static if there is only one local user. Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik@linux,intel.com> Thanks, Janusz > + > #endif /* _INTEL_LRC_H_ */ > _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx