All of lore.kernel.org
 help / color / mirror / Atom feed
From: John.C.Harrison@Intel.com
To: Intel-GFX@Lists.FreeDesktop.Org
Subject: [Intel-gfx] [PATCH] drm/i915/uc: Don't complain about FW versions when overridden
Date: Fri,  6 Dec 2019 17:01:55 -0800	[thread overview]
Message-ID: <20191207010155.24943-1-John.C.Harrison@Intel.com> (raw)
In-Reply-To: <20191121002723.33133-1-John.C.Harrison@Intel.com>

From: John Harrison <John.C.Harrison@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. Given that the whole point of the override is to
use different versions of FW, there isn't really much point reporting
the mis-match.

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.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
CC: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 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..aa1b7ad02b56 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
@@ -351,16 +351,15 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw, struct drm_i915_private *i915)
 	uc_fw->minor_ver_found = FIELD_GET(CSS_SW_VERSION_UC_MINOR,
 					   css->sw_version);
 
-	if (uc_fw->major_ver_found != uc_fw->major_ver_wanted ||
-	    uc_fw->minor_ver_found < uc_fw->minor_ver_wanted) {
+	if ((uc_fw->major_ver_found != uc_fw->major_ver_wanted ||
+	     uc_fw->minor_ver_found < uc_fw->minor_ver_wanted) &&
+	    !intel_uc_fw_is_overridden(uc_fw)) {
 		dev_notice(dev, "%s firmware %s: unexpected version: %u.%u != %u.%u\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);
-		if (!intel_uc_fw_is_overridden(uc_fw)) {
-			err = -ENOEXEC;
-			goto fail;
-		}
+		err = -ENOEXEC;
+		goto fail;
 	}
 
 	obj = i915_gem_object_create_shmem_from_data(i915, fw->data, fw->size);
-- 
2.21.0.5.gaeb582a983

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-12-07  1:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21  0:27 [PATCH] drm/i915/uc: Extra info notice about FW version mis-match vs overrides John.C.Harrison
2019-11-21  0:27 ` [Intel-gfx] " John.C.Harrison
2019-11-21 10:43 ` Michal Wajdeczko
2019-11-21 10:43   ` [Intel-gfx] " Michal Wajdeczko
2019-12-06 21:21   ` John Harrison
2019-12-07 20:04     ` Michal Wajdeczko
2019-12-07  1:01 ` John.C.Harrison [this message]
2019-12-07 20:19   ` [Intel-gfx] [PATCH] drm/i915/uc: Don't complain about FW versions when overridden Michal Wajdeczko
2019-12-11  3:32 ` [Intel-gfx] [PATCH v3] drm/i915/uc: More useful FW version mis-match notice John.C.Harrison

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=20191207010155.24943-1-John.C.Harrison@Intel.com \
    --to=john.c.harrison@intel.com \
    --cc=Intel-GFX@Lists.FreeDesktop.Org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.