[Intel-gfx] [PATCH v2 5/7] drm/i915/guc: Combine enable_guc_loading|submission modparams
Sagar Arun Kamble
sagar.a.kamble at intel.com
Fri Dec 1 15:47:40 UTC 2017
On 12/1/2017 4:03 PM, Michal Wajdeczko wrote:
> We currently have two module parameters that control GuC:
> "enable_guc_loading" and "enable_guc_submission". Whenever
> we need submission=1, we also need loading=1. We also need
> loading=1 when we want to want to load and verify the HuC.
>
> Lets combine above module parameters into one "enable_guc"
> modparam. New supported bit values are:
>
> 0=disable GuC (no GuC submission, no HuC)
> 1=enable GuC submission
> 2=enable HuC load
>
> Special value "-1" can be used to let driver decide what
> option should be enabled for given platform based on
> hardware/firmware availability or preference.
>
> Explicit enabling any of the GuC features makes GuC load
> a required step, fallback to non-GuC mode will not be
> supported.
>
> v2: Don't use -EIO
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kamble at intel.com>
> Cc: Sujaritha Sundaresan <sujaritha.sundaresan at intel.com>
<snip>
> +void intel_uc_sanitize_options(struct drm_i915_private *dev_priv)
> +{
> + struct intel_uc_fw *guc_fw = &dev_priv->guc.fw;
> + struct intel_uc_fw *huc_fw = &dev_priv->huc.fw;
> + int enable_guc = __get_default_enable_guc(dev_priv);
>
> /* A negative value means "use platform default" */
> - if (i915_modparams.enable_guc_submission < 0)
> - i915_modparams.enable_guc_submission = HAS_GUC_SCHED(dev_priv);
> + if (i915_modparams.enable_guc < 0)
> + i915_modparams.enable_guc = enable_guc;
> +
> + /* Verify GuC firmware availability */
> + if (USES_GUC(dev_priv) && !intel_uc_fw_is_selected(guc_fw)) {
> + DRM_WARN("Incompatible option enable_guc=%d - %s\n",
> + i915_modparams.enable_guc,
> + !HAS_GUC(dev_priv) ? "no GuC hardware" :
> + "no GuC firmware");
> + }
> +
> + /* Verify HuC firmware availability */
> + if (USES_GUC_SUBMISSION(dev_priv) && !intel_uc_fw_is_selected(huc_fw)) {
should be USES_HUC here
More information about the Intel-gfx
mailing list