All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Wajdeczko" <michal.wajdeczko@intel.com>
To: intel-gfx@lists.freedesktop.org, Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [P v4 08/11] drm/i915/uc: Improve debug messages in firmware fetch
Date: Thu, 12 Oct 2017 20:31:52 +0200	[thread overview]
Message-ID: <op.y70drebcxaggs7@mwajdecz-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <150779924147.26842.9693806913672470020@mail.alporthouse.com>

On Thu, 12 Oct 2017 11:07:21 +0200, Chris Wilson  
<chris@chris-wilson.co.uk> wrote:

> Quoting Michal Wajdeczko (2017-10-10 15:51:32)
>> Time to remove less important info and make messages clear
>> and consistent.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_uc_fw.c | 73  
>> +++++++++++++++++++++++---------------
>>  1 file changed, 44 insertions(+), 29 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_uc_fw.c  
>> b/drivers/gpu/drm/i915/intel_uc_fw.c
>> index 482115b..b52d6b6 100644
>> --- a/drivers/gpu/drm/i915/intel_uc_fw.c
>> +++ b/drivers/gpu/drm/i915/intel_uc_fw.c
>> @@ -45,26 +45,33 @@ void intel_uc_fw_fetch(struct drm_i915_private  
>> *dev_priv,
>>         size_t size;
>>         int err;
>>
>> +       DRM_DEBUG_DRIVER("%s fw fetch %s\n",
>> +                        intel_uc_fw_type_repr(uc_fw->type),  
>> uc_fw->path);
>> +
>>         if (!uc_fw->path)
>>                 return;
>>
>>         uc_fw->fetch_status = INTEL_UC_FIRMWARE_PENDING;
>> -
>> -       DRM_DEBUG_DRIVER("before requesting firmware: uC fw fetch  
>> status %s\n",
>> +       DRM_DEBUG_DRIVER("%s fw fetch %s\n",
>> +                        intel_uc_fw_type_repr(uc_fw->type),
>>                          intel_uc_fw_status_repr(uc_fw->fetch_status));
>>
>>         err = request_firmware(&fw, uc_fw->path, &pdev->dev);
>> -       if (err)
>> -               goto fail;
>> -       if (!fw)
>> +       if (err) {
>> +               DRM_NOTE("%s: Error while requesting firmware\n",
>> +                        intel_uc_fw_type_repr(uc_fw->type));
>
> So what am I, the user, meant to do? Do I need to worry? What are the
> consequences of this?

Yes, you can be little worried.
Being here means that driver decided to install *desired* firmware.

We don't know the consequences yet, as there might be a fallback
scenario available (like execlist submission, huc not used)

As we are jumping into fail label, which will start with similar
message, I can downgrade this message into DRM_DEBUG_DRIVER to
avoid duplication.

>
>>                 goto fail;
>> +       }
>
> ...
> fail:
>> +       DRM_WARN("%s: Failed to fetch firmware %s (error %d)\n",
>> +                intel_uc_fw_type_repr(uc_fw->type), uc_fw->path, err);
>
> And then my "significant but normal" message has suddenly become a
> warning the driver is crippled. Make up your mind, do I need to panic or
> not?

Good point. This can be DRM_NOTE.

But maybe we should promote some other existing DRM_NOTEs into:

DRM_WARN("%s: Unexpected firmware size (%zu, min %zu)\n",
DRM_WARN("%s: Mismatched firmware header definition\n",
DRM_WARN("%s: Mismatched firmware header definition\n",
DRM_WARN("%s: Mismatched firmware RSA key size (%u)\n",
DRM_WARN("%s: Truncated firmware (%zu, expected %zu)\n",

as these indicates corrupted/mismatched data (and it's not normal)

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

  reply	other threads:[~2017-10-12 18:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 14:51 [P v4 00/11] drm/i915/uc: Firmware code reorg Michal Wajdeczko
2017-10-10 14:51 ` [P v4 01/11] drm/i915: Move intel_guc_wopcm_size to intel_guc.c Michal Wajdeczko
2017-10-12  8:43   ` Chris Wilson
2017-10-10 14:51 ` [P v4 02/11] drm/i915/guc: Move GuC boot param initialization out of xfer Michal Wajdeczko
2017-10-11 22:55   ` Daniele Ceraolo Spurio
2017-10-12 17:31     ` Michal Wajdeczko
2017-10-12  8:51   ` Chris Wilson
2017-10-12 15:03     ` Michal Wajdeczko
2017-10-10 14:51 ` [P v4 03/11] drm/i915/guc: Move doc near related definitions Michal Wajdeczko
2017-10-10 14:51 ` [P v4 04/11] drm/i915/guc: Rename intel_guc_loader.c to intel_guc_fw.c Michal Wajdeczko
2017-10-12  8:59   ` Chris Wilson
2017-10-10 14:51 ` [P v4 05/11] drm/i915/guc: Reorder functions in intel_guc_fw.c Michal Wajdeczko
2017-10-10 14:51 ` [P v4 06/11] drm/i915/guc: Move firmware size check out of generic code Michal Wajdeczko
2017-10-10 14:51 ` [P v4 07/11] drm/i915/guc: Pick better place for Guc final status message Michal Wajdeczko
2017-10-12  9:03   ` Chris Wilson
2017-10-10 14:51 ` [P v4 08/11] drm/i915/uc: Improve debug messages in firmware fetch Michal Wajdeczko
2017-10-12  9:07   ` Chris Wilson
2017-10-12 18:31     ` Michal Wajdeczko [this message]
2017-10-10 14:51 ` [P v4 09/11] drm/i915/uc: Unify firmware loading Michal Wajdeczko
2017-10-12  9:12   ` Chris Wilson
2017-10-12 18:32     ` Michal Wajdeczko
2017-10-10 14:51 ` [P v4 10/11] drm/i915/huc: Move fw select function Michal Wajdeczko
2017-10-12  9:12   ` Chris Wilson
2017-10-10 14:51 ` [P v4 11/11] HAX enable GuC submission for CI Michal Wajdeczko
2017-10-10 14:54 ` [P v4 00/11] drm/i915/uc: Firmware code reorg Michal Wajdeczko
2017-10-10 16:38 ` ✗ Fi.CI.BAT: failure for " Patchwork

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=op.y70drebcxaggs7@mwajdecz-mobl1.ger.corp.intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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.