Re: [PATCH 09/10] drm/i915/uc: Separate firmware selection and preparation

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

 



On pe, 2017-02-24 at 16:40 +0100, Arkadiusz Hiler wrote:
> intel_{h,g}uc_init_fw selects correct firmware and then triggers it's
> preparation (fetch + initial parsing).
> 
> This change separates out select steps, so those can be called by
> the sanitize_options().
> 
> Then, during the init_fw() we prepare the firmware if the firmware was
> selected.
> 
> Cc: Michal Winiarski <michal.winiarski@xxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

One comment below.

> @@ -66,6 +66,16 @@ void intel_uc_sanitize_options(struct drm_i915_private *dev_priv)
>  		if (!i915.enable_guc_loading)
>  			i915.enable_guc_submission = 0;
>  	}
> +
> +	if (i915.enable_guc_loading) {
> +		if (HAS_HUC_UCODE(dev_priv))
> +			intel_huc_select_fw(&dev_priv->huc);
> +
> +		intel_guc_select_fw(&dev_priv->guc);
> +
> +		if (!dev_priv->guc.fw.path)
> +			i915.enable_guc_loading = 0;

Maybe make this (as suggested by Michal):

	if (intel_guc_select_fw(&dev_priv->guc) < 0)
		i915.enable_guc_loading = 0;

I think the select_fw is appropriate in this place once we introduce
the option to override the FW path, it'll part of sanitization.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
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