[Intel-xe] [PATCH] drm/xe/xe_uc_fw: Use firmware files from standard locations
Mauro Carvalho Chehab
mauro.chehab at linux.intel.com
Wed Mar 15 06:11:45 UTC 2023
On Fri, 10 Mar 2023 09:13:39 +0100
Mauro Carvalho Chehab <mauro.chehab at linux.intel.com> wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
>
> The GuC/HuC firmware files used by Xe drivers are the same as
> used by i915. Use the already-known location to find those
> firmware files, for a couple of reasons:
>
> 1. Avoid having the same firmware placed on two different
> places on MODULE_FIRMWARE(), if both 915 and xe drivers
> are compiled;
>
> 2. Having firmware files located on different locations may end
> creating bigger initramfs, as the same files will be copied
> twice my mkinitrd/dracut/...;
Heh, it turns that it may not even be placing the firmware at the right
place, if someone does a symlink for /lib/firmware/xe pointing to
/lib/firmware/i915 (or vice versa), depending on what's implemented
at the mkinitrd logic.
I found this on /usr/share/initramfs-tools/hook-functions:
# We don't need to replicate a chain of links completely;
# just link directly to the ultimate target
link_target="$(readlink -f "${src}")" || return $(($? + 1))
So, basically, using Ubuntu's default mkinitrd package, if
/lib/firmware/xe is a symlink, instead of storing
/lib/firmware/xe/bxt_dmc_ver1_07.bin, it will actually store
/lib/firmware/i915/bxt_dmc_ver1_07.bin at the initramfs, which
will cause crashes if the Xe driver is not blacklisted.
Regards,
Mauro
More information about the Intel-xe
mailing list