From: "Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>
To: <John.C.Harrison@Intel.com>, <Intel-GFX@Lists.FreeDesktop.Org>
Cc: DRI-Devel@Lists.FreeDesktop.Org
Subject: Re: [Intel-gfx] [PATCH 6/6] drm/i915/uc: Make unexpected firmware versions an error in debug builds
Date: Fri, 28 Apr 2023 17:19:02 -0700 [thread overview]
Message-ID: <028db79a-cb8e-ef27-8ad0-0c1b3c15ef17@intel.com> (raw)
In-Reply-To: <20230421011525.3282664-7-John.C.Harrison@Intel.com>
On 4/20/2023 6:15 PM, John.C.Harrison@Intel.com wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
>
> If the DEBUG_GEM config option is set then escalate the 'unexpected
> firmware version' message from a notice to an error. This will ensure
> that the CI system treats such occurences as a failure and logs a bug
> about it (or fails the pre-merge testing).
>
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> ---
> drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 34 ++++++++++++++----------
> 1 file changed, 20 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
> index bc4011d55667c..c5b21d17ca437 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
> @@ -17,6 +17,12 @@
> #include "i915_drv.h"
> #include "i915_reg.h"
>
> +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM)
> +#define UNEXPECTED gt_err
> +#else
> +#define UNEXPECTED gt_notice
I tried to find an alternative word that had the same number of
characters as "gt_notice" so that we could avoid the indent in the diff,
but nothing came to mind, so:
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Daniele
> +#endif
> +
> static inline struct intel_gt *
> ____uc_fw_to_gt(struct intel_uc_fw *uc_fw, enum intel_uc_fw_type type)
> {
> @@ -828,10 +834,10 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw)
> if (uc_fw->file_wanted.ver.major && uc_fw->file_selected.ver.major) {
> /* Check the file's major version was as it claimed */
> if (uc_fw->file_selected.ver.major != uc_fw->file_wanted.ver.major) {
> - gt_notice(gt, "%s firmware %s: unexpected version: %u.%u != %u.%u\n",
> - intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path,
> - uc_fw->file_selected.ver.major, uc_fw->file_selected.ver.minor,
> - uc_fw->file_wanted.ver.major, uc_fw->file_wanted.ver.minor);
> + UNEXPECTED(gt, "%s firmware %s: unexpected version: %u.%u != %u.%u\n",
> + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path,
> + uc_fw->file_selected.ver.major, uc_fw->file_selected.ver.minor,
> + uc_fw->file_wanted.ver.major, uc_fw->file_wanted.ver.minor);
> if (!intel_uc_fw_is_overridden(uc_fw)) {
> err = -ENOEXEC;
> goto fail;
> @@ -849,16 +855,16 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw)
> /* Preserve the version that was really wanted */
> memcpy(&uc_fw->file_wanted, &file_ideal, sizeof(uc_fw->file_wanted));
>
> - gt_notice(gt, "%s firmware %s (%d.%d.%d) is recommended, but only %s (%d.%d.%d) was found\n",
> - intel_uc_fw_type_repr(uc_fw->type),
> - uc_fw->file_wanted.path,
> - uc_fw->file_wanted.ver.major,
> - uc_fw->file_wanted.ver.minor,
> - uc_fw->file_wanted.ver.patch,
> - uc_fw->file_selected.path,
> - uc_fw->file_selected.ver.major,
> - uc_fw->file_selected.ver.minor,
> - uc_fw->file_selected.ver.patch);
> + UNEXPECTED(gt, "%s firmware %s (%d.%d.%d) is recommended, but only %s (%d.%d.%d) was found\n",
> + intel_uc_fw_type_repr(uc_fw->type),
> + uc_fw->file_wanted.path,
> + uc_fw->file_wanted.ver.major,
> + uc_fw->file_wanted.ver.minor,
> + uc_fw->file_wanted.ver.patch,
> + uc_fw->file_selected.path,
> + uc_fw->file_selected.ver.major,
> + uc_fw->file_selected.ver.minor,
> + uc_fw->file_selected.ver.patch);
> gt_info(gt, "Consider updating your linux-firmware pkg or downloading from %s\n",
> INTEL_UC_FIRMWARE_URL);
> }
next prev parent reply other threads:[~2023-04-29 0:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 1:15 [Intel-gfx] [PATCH 0/6] Improvements to uc firmare management John.C.Harrison
2023-04-21 1:15 ` [Intel-gfx] [PATCH 1/6] drm/i915/guc: Decode another GuC load failure case John.C.Harrison
2023-04-21 1:15 ` [Intel-gfx] [PATCH 2/6] drm/i915/guc: Print status register when waiting for GuC to load John.C.Harrison
2023-04-21 1:15 ` [Intel-gfx] [PATCH 3/6] drm/i915/uc: Track patch level versions on reduced version firmware files John.C.Harrison
2023-04-28 23:53 ` Ceraolo Spurio, Daniele
2023-04-21 1:15 ` [Intel-gfx] [PATCH 4/6] drm/i915/uc: Enhancements to firmware table validation John.C.Harrison
2023-04-29 0:04 ` Ceraolo Spurio, Daniele
2023-04-29 0:16 ` John Harrison
2023-04-29 0:26 ` Ceraolo Spurio, Daniele
2023-04-29 0:30 ` John Harrison
2023-04-29 0:32 ` John Harrison
2023-04-29 1:21 ` Ceraolo Spurio, Daniele
2023-04-21 1:15 ` [Intel-gfx] [PATCH 5/6] drm/i915/uc: Reject duplicate entries in firmware table John.C.Harrison
2023-04-29 0:08 ` Ceraolo Spurio, Daniele
2023-04-21 1:15 ` [Intel-gfx] [PATCH 6/6] drm/i915/uc: Make unexpected firmware versions an error in debug builds John.C.Harrison
2023-04-29 0:19 ` Ceraolo Spurio, Daniele [this message]
2023-04-29 0:21 ` John Harrison
2023-04-21 2:26 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Improvements to uc firmare management (rev2) Patchwork
2023-04-21 2:26 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-04-21 2:43 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-04-21 20:54 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Improvements to uc firmare management (rev3) Patchwork
2023-04-21 20:54 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-04-21 21:05 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-04-25 1:21 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Improvements to uc firmare management (rev4) Patchwork
2023-04-25 1:21 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-04-25 1:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-25 8:54 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=028db79a-cb8e-ef27-8ad0-0c1b3c15ef17@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=DRI-Devel@Lists.FreeDesktop.Org \
--cc=Intel-GFX@Lists.FreeDesktop.Org \
--cc=John.C.Harrison@Intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox