drm/xe/xe_uc_fw: Use firmware files from standard locations
Subsystems (2)
PATCH 1/1 drm/xe/xe_uc_fw: Use firmware files from standard locations
From: Mauro Carvalho Chehab <[email protected]>
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/...;
3. this is the place where those firmware files are located at
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
Upstream doesn't expect them to have on other places;
4. When built with display support, DMC firmware will be loaded from i915/ directory. It is very confusing to have some firmware files on a different place for the same driver.
--- drivers/gpu/drm/xe/xe_uc_fw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/xe/xe_uc_fw.c +2 -2
@@ -55,12 +55,12 @@ static struct xe_device *uc_fw_to_xe(struct xe_uc_fw *uc_fw) fw_def(TIGERLAKE, 0, huc_def(tgl, 7, 9, 3))#define __MAKE_UC_FW_PATH_MAJOR (prefix_, name_, major_) \ - "xe/" \ + "i915/" \ __stringify(prefix_) "_" name_ "_" \ __stringify(major_) ".bin"#define __MAKE_UC_FW_PATH (prefix_, name_, major_, minor_, patch_) \ - "xe/" \ + "i915/" \ __stringify(prefix_) name_ \ __stringify(major_) "." \ __stringify(minor_) "." \
Signature · 1 line
2.39.2
Quoted 39 lines · Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <[email protected]>
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/...;
3. this is the place where those firmware files are located at
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
Upstream doesn't expect them to have on other places;4. When built with display support, DMC firmware will be loaded from i915/ directory. It is very confusing to have some firmware files on a different place for the same driver.
Cc Matthew Brost <[email protected]>Cc Lucas de Marchi <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Thomas Hellstrom <[email protected]>Cc Daniel Vetter <[email protected]>Cc David Airlie <[email protected]>Signed-off-by Mauro Carvalho Chehab <[email protected]>---
drivers/gpu/drm/xe/xe_uc_fw.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/xe/xe_uc_fw.c +0
-0@@ -55,12 +55,12 @@ static struct xe_device *uc_fw_to_xe(struct xe_uc_fw *uc_fw)fw_def (TIGERLAKE ,0 ,huc_def (tgl,7 ,9 ,3 ))
drivers/gpu/drm/xe/xe_uc_fw.c static struct xe_device *uc_fw_to_xe(struct xe_uc_fw *uc_fw) · line 63
Quoted 10 lines
drivers/gpu/drm/xe/xe_uc_fw.c +2
-2#define __MAKE_UC_FW_PATH_MAJOR (prefix_, name_, major_) \ - "xe/" \ + "i915/" \ __stringify(prefix_) "_" name_ "_" \ __stringify(major_) ".bin"#define __MAKE_UC_FW_PATH (prefix_, name_, major_, minor_, patch_) \ - "xe/" \ + "i915/" \
Looking at the old branch history, it seems this stayed as xe/ since guc support started. At some point I think it was thought about having the xe symlink in the upstream firmware repository, but I'm not sure. At the time there could also be the issue with the firmware versions, particularly guc, that needs an update on the kernel side too. However we dropped them from the name in i915.
We should probably do the same in xe as a follow up.
I agree with the direction here, but need an ack from the other people in Cc.
Mauro, you also have to change the URL in drivers/gpu/drm/xe/xe_uc_fw.h. With that,
thanks
Lucas De Marchi
Quoted 6 lines
drivers/gpu/drm/xe/xe_uc_fw.c +0
-0__stringify(prefix_) name_ \ __stringify(major_) "." \ __stringify(minor_) "." \Signature · 1 line
2.39.2