All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Wajdeczko" <michal.wajdeczko@intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	intel-gfx@lists.freedesktop.org,
	Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [PATCH v3] drm/i915: Add Guc/HuC firmware details to error state
Date: Fri, 20 Oct 2017 14:36:59 +0200	[thread overview]
Message-ID: <op.y8eqnxk8xaggs7@mwajdecz-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <150850207620.29194.16007451844039913262@mail.alporthouse.com>

On Fri, 20 Oct 2017 14:21:16 +0200, Chris Wilson  
<chris@chris-wilson.co.uk> wrote:

> Quoting Michal Wajdeczko (2017-10-20 13:14:45)
>> On Fri, 20 Oct 2017 13:44:04 +0200, Chris Wilson
>> <chris@chris-wilson.co.uk> wrote:
>>
>> > Quoting Joonas Lahtinen (2017-10-20 10:41:57)
>> >> On Thu, 2017-10-19 at 20:23 +0000, Michal Wajdeczko wrote:
>> >> > @@ -774,6 +793,11 @@ int i915_error_state_to_str(struct
>> >> drm_i915_error_state_buf *m,
>> >> >       err_print_capabilities(m, &error->device_info);
>> >> >       err_print_params(m, &error->params);
>> >> >
>> >> > +     if (error->device_info.has_guc) {
>> >> > +             intel_uc_fw_dump(&error->guc_fw, &p);
>> >> > +             intel_uc_fw_dump(&error->huc_fw, &p);
>> >> > +     }
>> >>
>> >> I might use "error->{g,h}uc_fw.path" as the condition, for both
>> >> individually. We will have DMC here in the future, too.
>> >
>> > That's the type of predicate I was looking for. If we can tell when  
>> the
>> > fw has been loaded just by looking at the uc_fw struct, please do so.
>>
>> If you want to include uc fw info only when fw was loaded at capture
>> moment,
>> then we can look directly at its "load_status" field:
>>
>>         if (error->guc_fw.load_status == INTEL_UC_FIRMWARE_SUCCESS)
>>
>> But what if fw was loaded earlier, before error capture is started?
>> Don't we want to capture whole driver configuration?
>
> The goal is to know what the driver/hw was doing at the time of the
> capture (which we presume is still identical to the hang).
>
> At this point, we are just asking ourselves what is the most unambiguous
> way of printing valid data. We already show has_guc in the output, so it
> boils down to what was the uc_fw state. It doesn't need to be
> load_status == SUCCESS, as we should show a failed attempt to upload the
> fw as well.
>
> So intel_uc_fw.size?

But then in case of zero size fw you will not get info about load failure  
;)

What about leaving here "if (error->device_info.has_guc)" as main guard
for both GuC and HuC fw dumps (note that upcoming series make it explicit
that HuC is always in pair with GuC) but then also add "if (uc_fw->path)"
condition to the uc fw pretty printer to stop printing fw details if no
path was specified (all fields will be void anyway). Then we may get:

has_guc: yes
...
GuC firmware: (null)
HuC firmware: (null)


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

  reply	other threads:[~2017-10-20 12:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 20:23 [PATCH v3] drm/i915: Add Guc/HuC firmware details to error state Michal Wajdeczko
2017-10-19 20:47 ` ✗ Fi.CI.BAT: failure for drm/i915: Add Guc/HuC firmware details to error state (rev3) Patchwork
2017-10-20  9:41 ` [PATCH v3] drm/i915: Add Guc/HuC firmware details to error state Joonas Lahtinen
2017-10-20 11:44   ` Chris Wilson
2017-10-20 12:14     ` Michal Wajdeczko
2017-10-20 12:21       ` Chris Wilson
2017-10-20 12:36         ` Michal Wajdeczko [this message]
2017-10-20 12:43           ` Chris Wilson
2017-10-20 12:50             ` Michal Wajdeczko
2017-10-20 12:57               ` Chris Wilson
2017-10-20 14:44   ` Michal Wajdeczko
2017-10-20 14:50     ` Chris Wilson
2017-10-20 14:59       ` Michal Wajdeczko
2017-10-20 15:14         ` Chris Wilson

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.y8eqnxk8xaggs7@mwajdecz-mobl1.ger.corp.intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    /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.