[Intel-gfx] [PATCH] drm/i915: Show firmware URL once
Chris Wilson
chris at chris-wilson.co.uk
Sun Oct 22 10:15:50 UTC 2017
Just show the firmware URL on the first failure, not every failure.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
---
drivers/gpu/drm/i915/intel_csr.c | 3 +--
drivers/gpu/drm/i915/intel_uc_fw.c | 13 +++++++++++--
drivers/gpu/drm/i915/intel_uc_fw.h | 5 ++---
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index da9de47562b8..12a857acdb9b 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -427,8 +427,7 @@ static void csr_load_work_fn(struct work_struct *work)
"Failed to load DMC firmware %s."
" Disabling runtime power management.\n",
csr->fw_path);
- dev_notice(dev_priv->drm.dev, "DMC firmware homepage: %s",
- INTEL_UC_FIRMWARE_URL);
+ intel_uc_fw_show_url(dev_priv);
}
release_firmware(fw);
diff --git a/drivers/gpu/drm/i915/intel_uc_fw.c b/drivers/gpu/drm/i915/intel_uc_fw.c
index 973888e94cba..4ee90fda326b 100644
--- a/drivers/gpu/drm/i915/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/intel_uc_fw.c
@@ -28,6 +28,16 @@
#include "intel_uc_fw.h"
#include "i915_drv.h"
+/* Home of GuC, HuC and DMC firmwares */
+#define INTEL_UC_FIRMWARE_URL "https://01.org/linuxgraphics/downloads/firmware"
+
+void intel_uc_fw_show_url(struct drm_i915_private *i915)
+{
+ dev_info_once(i915->drm.dev,
+ "Firmware can be downloaded from %s\n",
+ INTEL_UC_FIRMWARE_URL);
+}
+
/**
* intel_uc_fw_fetch - fetch uC firmware
*
@@ -189,8 +199,7 @@ void intel_uc_fw_fetch(struct drm_i915_private *dev_priv,
DRM_WARN("%s: Failed to fetch firmware %s (error %d)\n",
intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, err);
- DRM_INFO("%s: Firmware can be downloaded from %s\n",
- intel_uc_fw_type_repr(uc_fw->type), INTEL_UC_FIRMWARE_URL);
+ intel_uc_fw_show_url(dev_priv);
release_firmware(fw); /* OK even if fw is NULL */
}
diff --git a/drivers/gpu/drm/i915/intel_uc_fw.h b/drivers/gpu/drm/i915/intel_uc_fw.h
index 132903669391..e18b9bedab02 100644
--- a/drivers/gpu/drm/i915/intel_uc_fw.h
+++ b/drivers/gpu/drm/i915/intel_uc_fw.h
@@ -29,9 +29,6 @@ struct drm_printer;
struct drm_i915_private;
struct i915_vma;
-/* Home of GuC, HuC and DMC firmwares */
-#define INTEL_UC_FIRMWARE_URL "https://01.org/linuxgraphics/downloads/firmware"
-
enum intel_uc_fw_status {
INTEL_UC_FIRMWARE_FAIL = -1,
INTEL_UC_FIRMWARE_NONE = 0,
@@ -118,4 +115,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(struct intel_uc_fw *uc_fw, struct drm_printer *p);
+void intel_uc_fw_show_url(struct drm_i915_private *i915);
+
#endif
--
2.15.0.rc1
More information about the Intel-gfx
mailing list