From: Marc Herbert <Marc.Herbert@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm/i915: Notify user about outdated dmc firmware
Date: Wed, 21 Oct 2015 17:48:23 -0700 [thread overview]
Message-ID: <n09boo$hj0$1@ger.gmane.org> (raw)
In-Reply-To: <87r3l5tupw.fsf@gaia.fi.intel.com>
> On machines that had 1.19 symlinked, in filesystem, execlist submission
> sometimes broke due to interrupt delivery problem. To reach a conclusion
> that it was csr firmware, before 1.21 was out, took quite amount of work.
>
> I bet there are still machines with 1.19 only, and we get to
> wade through error states trying to connect the dots.
>
> [...]
> So we are left with triaging. Which is true detective work as there are
> no traces of firmware versions nor loading success/fails on
> logs/error states.
>
I think this "Finished loading" log statement below should not just include the version
numbers, its level should also be increased to something like "INFO" so
the DMC version always makes it to the logs. Collecting the error state is
less obvious and less usual than collecting logs; some users don't even know
about it.
>>>>> @@ -387,6 +390,12 @@ static void finish_csr_load(const struct firmware *fw, void *context)
>>>>>
>>>>> DRM_DEBUG_KMS("Finished loading %s v%u.%u\n", dev_priv->csr.fw_path,
>>>>> csr->dmc_ver_major, csr->dmc_ver_minor);
---------
To be honest (and likely off-topic), I even think request_firmware() should log the
resolved symlink by default. Quick & dirty proof of concept below to illustrate.
The kernel is normally quick enough to squeal "TAINTED!". On the other hand
request_firmware() loads random binaries without even saying anywhere it did.
Rationale?
Marc
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -344,17 +345,24 @@ static int fw_get_filesystem_firmware(struct device *device,
else
break;
}
- __putname(path);
if (!rc) {
- dev_dbg(device, "firmware: direct-loading firmware %s\n",
- buf->fw_id);
+ // fallback on symlink in case lookup goes wrong
+ const char *resolved_sym = path;
+
+ struct path dp;
+ if (!kern_path(path, LOOKUP_FOLLOW, &dp))
+ resolved_sym = dp.dentry->d_name.name;
+
+ dev_info(device, "firmware: direct-loading firmware %s\n",
+ resolved_sym);
mutex_lock(&fw_lock);
set_bit(FW_STATUS_DONE, &buf->status);
complete_all(&buf->completion);
mutex_unlock(&fw_lock);
}
+ __putname(path);
return rc;
}
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-22 0:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 15:17 [PATCH 1/5] drm/i915: Store and print dmc firmware version Mika Kuoppala
2015-09-18 15:17 ` [PATCH 2/5] drm/i915: Notify user about outdated dmc firmware Mika Kuoppala
2015-09-21 7:30 ` Jani Nikula
2015-09-21 8:30 ` Mika Kuoppala
2015-10-08 9:41 ` Animesh Manna
2015-10-08 12:23 ` Mika Kuoppala
2015-10-08 14:45 ` Animesh Manna
2015-10-13 12:30 ` Dave Gordon
2015-10-22 0:48 ` Marc Herbert [this message]
2015-09-23 10:09 ` [PATCH 2/5] drm/i915/skl: Refuse to load " Mika Kuoppala
2015-09-18 15:17 ` [PATCH 3/5] drm/i915: Add dmc firmware version to error state Mika Kuoppala
2015-09-18 15:17 ` [PATCH 4/5] drm/i915: Add pci device revision " Mika Kuoppala
2015-09-18 15:17 ` [PATCH 5/5] drm/i915: Add dmc firmware debugfs status entry Mika Kuoppala
2015-10-08 10:08 ` Animesh Manna
2015-10-21 12:14 ` Mika Kuoppala
2015-10-08 9:56 ` [PATCH 1/5] drm/i915: Store and print dmc firmware version Animesh Manna
2015-10-08 11:03 ` Damien Lespiau
2015-10-08 15:04 ` Damien Lespiau
2015-10-21 13:46 ` Mika Kuoppala
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='n09boo$hj0$1@ger.gmane.org' \
--to=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.