On Fri, 01 Dec 2017 16:47:40 +0100, Sagar Arun Kamble <[email protected]> wrote:



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 <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Sagar Arun Kamble <[email protected]>
Cc: Sujaritha Sundaresan <[email protected]>
<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

good catch! thanks
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to