diff mbox

[v3,10/14] drm/i915/uc: Add message with firmware url

Message ID 20171012225447.256-11-michal.wajdeczko@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Wajdeczko Oct. 12, 2017, 10:54 p.m. UTC
In case of firmware fetch failure we should help user
find latest firmware.

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_uc_fw.c | 2 ++
 drivers/gpu/drm/i915/intel_uc_fw.h | 2 ++
 2 files changed, 4 insertions(+)

Comments

Chris Wilson Oct. 12, 2017, 11:20 p.m. UTC | #1
Quoting Michal Wajdeczko (2017-10-12 23:54:43)
> diff --git a/drivers/gpu/drm/i915/intel_uc_fw.h b/drivers/gpu/drm/i915/intel_uc_fw.h
> index 5c01849..1d580fa 100644
> --- a/drivers/gpu/drm/i915/intel_uc_fw.h
> +++ b/drivers/gpu/drm/i915/intel_uc_fw.h
> @@ -27,6 +27,8 @@
>  
>  struct drm_i915_private;
>  
> +#define INTEL_UC_FIRMWARE_URL "https://01.org/linuxgraphics/downloads/firmware"

Pull it out from intel_csr.c, say intel_drv.h?
-Chris
Michal Wajdeczko Oct. 13, 2017, 6:47 a.m. UTC | #2
On Fri, 13 Oct 2017 01:20:05 +0200, Chris Wilson  
<chris@chris-wilson.co.uk> wrote:

> Quoting Michal Wajdeczko (2017-10-12 23:54:43)
>> diff --git a/drivers/gpu/drm/i915/intel_uc_fw.h  
>> b/drivers/gpu/drm/i915/intel_uc_fw.h
>> index 5c01849..1d580fa 100644
>> --- a/drivers/gpu/drm/i915/intel_uc_fw.h
>> +++ b/drivers/gpu/drm/i915/intel_uc_fw.h
>> @@ -27,6 +27,8 @@
>>
>>  struct drm_i915_private;
>>
>> +#define INTEL_UC_FIRMWARE_URL  
>> "https://01.org/linuxgraphics/downloads/firmware"
>
> Pull it out from intel_csr.c, say intel_drv.h?

Well, the secret plan was to update intel_csr.c in separate patch.
Then we could fix message there to be more clear and user friendly,
as today URL is in place where one will expect firmware filename:

    "Failed to load DMC firmware"
    " [" FIRMWARE_URL "],"
    " disabling runtime power management.\n");

And for location of the URL macro, I still prefer intel_uc_fw.h
over intel_drv.h, as the latter one is little overloaded, while
former is still accessible to csr.c and there is a chance to
even reuse more uc_fw functions in csr.c in the future.

Michal
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_uc_fw.c b/drivers/gpu/drm/i915/intel_uc_fw.c
index 560fe39..e246dbd 100644
--- a/drivers/gpu/drm/i915/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/intel_uc_fw.c
@@ -179,6 +179,8 @@  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);
 
 	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 5c01849..1d580fa 100644
--- a/drivers/gpu/drm/i915/intel_uc_fw.h
+++ b/drivers/gpu/drm/i915/intel_uc_fw.h
@@ -27,6 +27,8 @@ 
 
 struct drm_i915_private;
 
+#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,