All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Marc Herbert <Marc.Herbert@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [DMC_REDESIGN_V2 07/14] drm/i915/gen9: Simplify csr loading failure printing.
Date: Wed, 7 Oct 2015 10:12:36 +0200	[thread overview]
Message-ID: <20151007081236.GA3383@phenom.ffwll.local> (raw)
In-Reply-To: <56142318.2080309@intel.com>

On Tue, Oct 06, 2015 at 12:38:00PM -0700, Marc Herbert wrote:
> On 30/09/15 07:28, Imre Deak wrote:
> >On ke, 2015-08-26 at 16:58 +0530, Animesh Manna wrote:
> >>
> >>-void i915_firmware_load_error_print(const char *fw_path, int err)
> >>-{
> >>-	DRM_ERROR("failed to load firmware %s (%d)\n", fw_path, err);
> >>-
> >>-	/*
> >>-	 * If the reason is not known assume -ENOENT since that's the most
> >>-	 * usual failure mode.
> >>-	 */
> >>-	if (!err)
> >>-		err = -ENOENT;
> >>-
> >>-	if (!(IS_BUILTIN(CONFIG_DRM_I915) && err == -ENOENT))
> >>-		return;
> >>-
> >>-	DRM_ERROR(
> >>-	  "The driver is built-in, so to load the firmware you need to\n"
> >>-	  "include it either in the kernel (see CONFIG_EXTRA_FIRMWARE) or\n"
> >>-	  "in your initrd/initramfs image.\n");
> >>-}
> >>-
> >
> >The point here was to clarify the reason why the loading failed, since
> >that caused quite a confusion. It was a separate function since the same
> >could've been called from the GuC loader too. I think the error message
> >would be still useful.
> 
> Agreed 100%. The code of this function was a bit confusing, however this
> error message has proved very useful "on the field" many times already.
> Please preserve the message.

I dunno really, this is pretty much known by all the other gpu drivers. If
you load things before the firmware is there it'll fail. Only difference
is that with i915 dmc is the first time we require firmware images for
some features.

We should document this in the release notes for the skl/bxt+ stacks, but
this really isn't all that useful in the kernel imo. It's really just how
fw loading works (with drm drivers at least), and at least distros do have
that operational knowledge since years.

Also only printing something for the built-in case seems wrong, since you
can equally screw things up when it's the driver is module. What we should
have instead is just a DRM_INFO or similar that we're disabling a few pm
features because the firmware isn't there.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-10-07  8:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 11:28 [DMC_REDESIGN_V2 00/14] Redesign dmc firmware loading Animesh Manna
2015-08-26 11:28 ` [DMC_REDESIGN_V2 01/14] drm/i915/gen9: csr_init after runtime pm enable Animesh Manna
2015-10-13 12:14   ` Imre Deak
2015-08-26 11:28 ` [DMC_REDESIGN_V2 02/14] drm/i915: use correct power domain for csr loading Animesh Manna
2015-08-26 11:28 ` [DMC_REDESIGN_V2 03/14] drm/i915/bxt: release rpm reference if csr firmware failed to load Animesh Manna
2015-09-30 14:24   ` Imre Deak
2015-10-14  6:29     ` Animesh Manna
2015-10-14  8:27       ` Imre Deak
2015-10-14  8:39       ` Jani Nikula
2015-08-26 11:28 ` [DMC_REDESIGN_V2 04/14] drm/i915/gen9: move assert_csr_loaded into intel_rpm.c Animesh Manna
2015-08-26 11:28 ` [DMC_REDESIGN_V2 05/14] drm/i915/gen9: Remove csr.state, csr_lock and related code Animesh Manna
2015-10-22 15:39   ` Imre Deak
2015-08-26 11:28 ` [DMC_REDESIGN_V2 06/14] drm/i915/gen9: Align line continuations in intel_csr.c Animesh Manna
2015-08-26 11:28 ` [DMC_REDESIGN_V2 07/14] drm/i915/gen9: Simplify csr loading failure printing Animesh Manna
2015-09-30 14:28   ` Imre Deak
2015-10-06 19:38     ` Marc Herbert
2015-10-07  8:12       ` Daniel Vetter [this message]
2015-08-26 11:28 ` [DMC_REDESIGN_V2 08/14] drm/i915/gen9: extract parse_csr_fw Animesh Manna
2015-08-26 11:28 ` [DMC_REDESIGN_V2 09/14] drm/i915/gen9: Don't try to load garbage dmc firmware on resume Animesh Manna
2015-08-26 11:28 ` [DMC_REDESIGN_V2 10/14] drm/i915/gen9: Use dev_priv in csr functions Animesh Manna
2015-08-26 11:28 ` [DMC_REDESIGN_V2 11/14] drm/i915: Use request_firmware and our own async work Animesh Manna
2015-08-26 11:28 ` [DMC_REDESIGN_V2 12/14] drm/i915/gen9: Use flush_work to synchronize with dmc loader Animesh Manna
2015-08-26 11:28 ` [DMC_REDESIGN_V2 13/14] drm/i915/skl: Removed assert for csr-fw-loading check during disabling dc6 Animesh Manna
2015-08-26 11:28 ` [DMC_REDESIGN_V2 14/14] drm/i915/gen9: Corrected the sanity check of mmio address range for csr Animesh Manna
2015-08-27  5:57 ` [DMC_REDESIGN_V2 00/14] Redesign dmc firmware loading Animesh Manna

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=20151007081236.GA3383@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Marc.Herbert@intel.com \
    --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.