[Intel-gfx] [PATCH 6/8] drm/i915/guc: Extract param logic form guc_init

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Feb 23 08:37:02 UTC 2017


On ke, 2017-02-22 at 13:41 +0100, Arkadiusz Hiler wrote:
> Let intel_guc_fetch_fw() focus on determining and fetching the correct
> firmware.
> 
> This patch introduces intel_uc_sanitize_options() that is called from
> intel_sanitize_options().
> 
> Then, if we have GuC, we can call intel_guc_fetch_fw() conditionally and
> we do not have to do the internal checks.
> 
> v2: fix comment, notify when nuking GuC explicitly enabled (M. Wajdeczko)
> v3: fix comment again, change the nuke message (M. Wajdeczko)
> 
> Cc: Michal Winiarski <michal.winiarski at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>

Ah, you already had this patch :)

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

One note below.

<SNIP>

> @@ -36,8 +57,12 @@ void intel_uc_init_early(struct drm_i915_private *dev_priv)
>  
>  void intel_uc_fetch_fw(struct drm_i915_private *dev_priv)
>  {
> +	if (!i915.enable_guc_loading)
> +		return;
> +
>  	dev_priv->huc.fw.fetch = uc_fetch_fw;
> -	intel_huc_fetch_fw(&dev_priv->huc);
> +	if (HAS_HUC_UCODE(dev_priv))
> +		intel_huc_fetch_fw(&dev_priv->huc);

With the addition of select_fw, the check would become

if (dev_priv->huc->fw.path)

to allow specifying the firmware from command line.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list