[Intel-gfx] [PATCH v3] drm/i915/uc: More useful FW version mis-match notice

John.C.Harrison at Intel.com John.C.Harrison at Intel.com
Wed Dec 11 03:32:32 UTC 2019


From: John Harrison <John.C.Harrison at Intel.com>

If a FW override is present then a version mis-match is actually
ignored. The warning notice was still being printed, though. Which
could confuse people by implying that the load had failed when it had
actually succeeded. So add an extra tag to the notice to say whether
the mis-match caused a failure to load (normal case) or was ignored
(override case).

So, only print the notice when actually failing the load and avoid any
potential confusion.

v2: Original patch added a new 'ignore the previous notice' notice.
Now it just suppresses the existing notice. Review feedback from
Michal W.
v3: Always print the notice, but add a tag about override or failure.
Review feedback from Michal W.

Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
CC: Michal Wajdeczko <michal.wajdeczko at intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 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 66a30ab7044a..deae1e89de0e 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
@@ -353,10 +353,12 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw, struct drm_i915_private *i915)
 
 	if (uc_fw->major_ver_found != uc_fw->major_ver_wanted ||
 	    uc_fw->minor_ver_found < uc_fw->minor_ver_wanted) {
-		dev_notice(dev, "%s firmware %s: unexpected version: %u.%u != %u.%u\n",
+		dev_notice(dev, "%s firmware %s: unexpected version: %u.%u != %u.%u, %s\n",
 			   intel_uc_fw_type_repr(uc_fw->type), uc_fw->path,
 			   uc_fw->major_ver_found, uc_fw->minor_ver_found,
-			   uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted);
+			   uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted,
+			   intel_uc_fw_is_overridden(uc_fw) ?
+			   "ignoring" : "aborting");
 		if (!intel_uc_fw_is_overridden(uc_fw)) {
 			err = -ENOEXEC;
 			goto fail;
-- 
2.21.0.5.gaeb582a983



More information about the Intel-gfx mailing list