Message ID | 20190712111445.21040-2-michal.wajdeczko@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Enable HuC by default for Gen11+ | expand |
Quoting Michal Wajdeczko (2019-07-12 14:14:44) > We are about to change default setting of "enable_guc" modparam > from 0(disabled) to -1(auto). As we only want to turn on > GuC/HuC on Gen11+, keep it off for older gens. > > Note that it would be still possible to enable GuC/HuC on these > old platforms using explicit "enable_guc=2" modparam. > > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> > Cc: Jani Nikula <jani.nikula@intel.com> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Regards, Joonas
On Fri, Jul 12, 2019 at 11:14:44AM +0000, Michal Wajdeczko wrote: > We are about to change default setting of "enable_guc" modparam > from 0(disabled) to -1(auto). As we only want to turn on > GuC/HuC on Gen11+, keep it off for older gens. > > Note that it would be still possible to enable GuC/HuC on these > old platforms using explicit "enable_guc=2" modparam. > > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> > Cc: Jani Nikula <jani.nikula@intel.com> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > --- > drivers/gpu/drm/i915/intel_uc.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c > index fdf00f1ebb57..72bbcb2597fd 100644 > --- a/drivers/gpu/drm/i915/intel_uc.c > +++ b/drivers/gpu/drm/i915/intel_uc.c > @@ -58,12 +58,16 @@ static int __get_platform_enable_guc(struct drm_i915_private *i915) > struct intel_uc_fw *huc_fw = &i915->huc.fw; > int enable_guc = 0; > > - /* Default is to use HuC if we know GuC and HuC firmwares */ > + if (!HAS_GUC(i915)) > + return 0; > + > + /* We don't want to enable GuC/HuC on pre-Gen11 by default */ > + if (INTEL_GEN(i915) < 11) > + return 0; > + > if (intel_uc_fw_is_selected(guc_fw) && intel_uc_fw_is_selected(huc_fw)) > enable_guc |= ENABLE_GUC_LOAD_HUC; > > - /* Any platform specific fine-tuning can be done here */ > - > return enable_guc; > } > > -- > 2.19.2 >
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c index fdf00f1ebb57..72bbcb2597fd 100644 --- a/drivers/gpu/drm/i915/intel_uc.c +++ b/drivers/gpu/drm/i915/intel_uc.c @@ -58,12 +58,16 @@ static int __get_platform_enable_guc(struct drm_i915_private *i915) struct intel_uc_fw *huc_fw = &i915->huc.fw; int enable_guc = 0; - /* Default is to use HuC if we know GuC and HuC firmwares */ + if (!HAS_GUC(i915)) + return 0; + + /* We don't want to enable GuC/HuC on pre-Gen11 by default */ + if (INTEL_GEN(i915) < 11) + return 0; + if (intel_uc_fw_is_selected(guc_fw) && intel_uc_fw_is_selected(huc_fw)) enable_guc |= ENABLE_GUC_LOAD_HUC; - /* Any platform specific fine-tuning can be done here */ - return enable_guc; }
We are about to change default setting of "enable_guc" modparam from 0(disabled) to -1(auto). As we only want to turn on GuC/HuC on Gen11+, keep it off for older gens. Note that it would be still possible to enable GuC/HuC on these old platforms using explicit "enable_guc=2" modparam. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> --- drivers/gpu/drm/i915/intel_uc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)