[Intel-gfx] [PATCH v7 3/6] drm/i915/uc: Reorder firmware status codes

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 2 19:40:08 UTC 2019


Quoting Michal Wajdeczko (2019-08-02 19:40:52)
> On Gen9 when we try to reload HuC due to GuC upload error, we hit:
> 
> <7> [232.025927] [drm:intel_uc_init_hw [i915]] GuC fw load failed: -8; will reset and retry 2 more time(s)
> <7> [232.026004] [drm:intel_uc_fw_upload [i915]] HuC fw load i915/kbl_huc_ver02_00_1810.bin
> <7> [232.026686] [drm:intel_uc_fw_upload [i915]] HuC fw xfer completed
> <6> [232.026688] [drm] HuC: Loaded firmware i915/kbl_huc_ver02_00_1810.bin (version 2.0)
> <3> [232.026703] intel_uc_fw_copy_rsa:541 GEM_BUG_ON(!intel_uc_fw_is_available(uc_fw))
> 
> as firmware that previously failed to load was wrongly treated as
> unavailable since its status code was not matching status check logic.
> 
> 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_fw.h | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
> index 6b64b8073703..bfe3614613b7 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
> @@ -37,12 +37,12 @@ struct intel_gt;
>  #define INTEL_UC_FIRMWARE_URL "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915"

Do you have to have some comments here on the ordering rule?

>  enum intel_uc_fw_status {
> -       INTEL_UC_FIRMWARE_FAIL = -3, /* failed to xfer or init/auth the fw */
> -       INTEL_UC_FIRMWARE_MISSING = -2, /* blob not found on the system */
> -       INTEL_UC_FIRMWARE_NOT_SUPPORTED = -1, /* no uc HW */
> +       INTEL_UC_FIRMWARE_NOT_SUPPORTED = -1, /* no uc HW or disabled */
>         INTEL_UC_FIRMWARE_UNINITIALIZED = 0, /* used to catch checks done too early */
>         INTEL_UC_FIRMWARE_SELECTED, /* selected the blob we want to load */
> +       INTEL_UC_FIRMWARE_MISSING, /* blob not found on the system */

/* All onwards are intel_uc_fw_is_available() */
>         INTEL_UC_FIRMWARE_AVAILABLE, /* blob found and copied in mem */
> +       INTEL_UC_FIRMWARE_FAIL, /* failed to xfer or init/auth the fw */

/* All onwards are intel_uc_fw_is_loaded() */
>         INTEL_UC_FIRMWARE_TRANSFERRED, /* dma xfer done */
>         INTEL_UC_FIRMWARE_RUNNING /* init/auth done */

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


More information about the Intel-gfx mailing list