[Intel-gfx] [PATCH 3/7] drm/i915/uc: Don't fetch HuC fw if GuC fw fetch already failed

Chris Wilson chris at chris-wilson.co.uk
Wed Aug 7 17:29:17 UTC 2019


Quoting Michal Wajdeczko (2019-08-07 18:00:30)
> When we failed to fetch GuC firmware there is no point in fetching
> HuC firmware as we will not be able to use it without working GuC.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_uc.c    | 5 ++++-
>  drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 8 +++++---
>  drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 3 +--
>  3 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> index 3c007e0e1a20..c40eab290342 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> @@ -283,11 +283,14 @@ static void guc_disable_communication(struct intel_guc *guc)
>  void intel_uc_fetch_firmwares(struct intel_uc *uc)
>  {
>         struct drm_i915_private *i915 = uc_to_gt(uc)->i915;
> +       int err;
>  
>         if (!intel_uc_supports_guc(uc))
>                 return;
>  
> -       intel_uc_fw_fetch(&uc->guc.fw, i915);
> +       err = intel_uc_fw_fetch(&uc->guc.fw, i915);
> +       if (err)
> +               return;

We still don't care about the err, just that it exists.

if (intel_uc_fw_fetch() return; ?

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the Intel-gfx mailing list