[Intel-gfx] [PATCH] drm/i915: Downgrade scare message for unknwown HuC firmware

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 8 10:11:45 UTC 2019


If we haven't shipped and enabled firmware for a particular platform,
there is nothing the user can do about it. Don't scare the user with an
unactionable, unindentifiable warning!

<6> [310.769452] i915 0000:00:02.0: GuC: No firmware known for this platform!
<4> [310.769458] [drm] HuC: No firmware known for this platform!

Unify both GuC/HuC messages to include the device for which we lack the
firmware, and provide the platform name as an aide-memoire.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_guc_fw.c | 4 +---
 drivers/gpu/drm/i915/intel_huc_fw.c | 3 +--
 drivers/gpu/drm/i915/intel_uc_fw.c  | 8 ++++++++
 drivers/gpu/drm/i915/intel_uc_fw.h  | 2 ++
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_fw.c b/drivers/gpu/drm/i915/intel_guc_fw.c
index 4b437e05e2cd..b8364bd8ccf8 100644
--- a/drivers/gpu/drm/i915/intel_guc_fw.c
+++ b/drivers/gpu/drm/i915/intel_guc_fw.c
@@ -78,9 +78,7 @@ static void guc_fw_select(struct intel_uc_fw *guc_fw)
 		guc_fw->major_ver_wanted = KBL_FW_MAJOR;
 		guc_fw->minor_ver_wanted = KBL_FW_MINOR;
 	} else {
-		dev_info(dev_priv->drm.dev,
-			 "%s: No firmware known for this platform!\n",
-			 intel_uc_fw_type_repr(guc_fw->type));
+		intel_uc_fw_unknown(dev_priv, guc_fw);
 	}
 }
 
diff --git a/drivers/gpu/drm/i915/intel_huc_fw.c b/drivers/gpu/drm/i915/intel_huc_fw.c
index 9612227b3c44..ba584321554c 100644
--- a/drivers/gpu/drm/i915/intel_huc_fw.c
+++ b/drivers/gpu/drm/i915/intel_huc_fw.c
@@ -77,8 +77,7 @@ static void huc_fw_select(struct intel_uc_fw *huc_fw)
 		huc_fw->major_ver_wanted = KBL_HUC_FW_MAJOR;
 		huc_fw->minor_ver_wanted = KBL_HUC_FW_MINOR;
 	} else {
-		DRM_WARN("%s: No firmware known for this platform!\n",
-			 intel_uc_fw_type_repr(huc_fw->type));
+		intel_uc_fw_unknown(dev_priv, huc_fw);
 	}
 }
 
diff --git a/drivers/gpu/drm/i915/intel_uc_fw.c b/drivers/gpu/drm/i915/intel_uc_fw.c
index fd496416087c..7673e3a3d237 100644
--- a/drivers/gpu/drm/i915/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/intel_uc_fw.c
@@ -310,3 +310,11 @@ void intel_uc_fw_dump(const struct intel_uc_fw *uc_fw, struct drm_printer *p)
 	drm_printf(p, "\tRSA: offset %u, size %u\n",
 		   uc_fw->rsa_offset, uc_fw->rsa_size);
 }
+
+void intel_uc_fw_unknown(struct drm_i915_private *i915, struct intel_uc_fw *fw)
+{
+	dev_info(i915->drm.dev,
+		 "%s: No firmware known for %s!\n",
+		 intel_uc_fw_type_repr(fw->type),
+		 intel_platform_name(INTEL_INFO(i915)->platform));
+}
diff --git a/drivers/gpu/drm/i915/intel_uc_fw.h b/drivers/gpu/drm/i915/intel_uc_fw.h
index 0e3bd580e267..4367f3d28c41 100644
--- a/drivers/gpu/drm/i915/intel_uc_fw.h
+++ b/drivers/gpu/drm/i915/intel_uc_fw.h
@@ -150,4 +150,6 @@ int intel_uc_fw_upload(struct intel_uc_fw *uc_fw,
 void intel_uc_fw_fini(struct intel_uc_fw *uc_fw);
 void intel_uc_fw_dump(const struct intel_uc_fw *uc_fw, struct drm_printer *p);
 
+void intel_uc_fw_unknown(struct drm_i915_private *i915, struct intel_uc_fw *fw);
+
 #endif
-- 
2.20.1



More information about the Intel-gfx mailing list