Re: [PATCH v2 6/7] drm/i915/huc: Load HuC only if requested

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Michal Wajdeczko (2017-12-01 10:33:16)
> Our new "enable_guc" modparam allows to control whenever HuC
> should be loaded. However existing code will try load and
> authenticate HuC always when we use the GuC. This patch is
> trying to enforce modparam selection.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Cc: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
> ---
> -void intel_huc_auth(struct intel_huc *huc)
> +int intel_huc_auth(struct intel_huc *huc)
>  {
>         struct drm_i915_private *i915 = huc_to_i915(huc);
>         struct intel_guc *guc = &i915->guc;
> @@ -213,14 +213,14 @@ void intel_huc_auth(struct intel_huc *huc)
>         int ret;
>  
>         if (huc->fw.load_status != INTEL_UC_FIRMWARE_SUCCESS)
> -               return;
> +               return -ENOEXEC;
>  
>         vma = i915_gem_object_ggtt_pin(huc->fw.obj, NULL, 0, 0,
>                                 PIN_OFFSET_BIAS | GUC_WOPCM_TOP);
>         if (IS_ERR(vma)) {
> -               DRM_ERROR("failed to pin huc fw object %d\n",
> -                               (int)PTR_ERR(vma));
> -               return;
> +               ret = (int)PTR_ERR(vma);

The advantage here is that (int) is now implicit.

Looks ok. I'd recommend we add the various expected combinations to
drv_module_reload.
"enable_guc=0"
"enable_guc=0x1"
"enable_guc=0x2"
"enable_guc=0x3"
etc?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux