linux-firmware: Fix hardware sleep regression in amdnpu firmware

linux-firmware 20260221 introduced new AMD NPU firmware that’s
incompatible with kernels before the unreleased 7.0-rc versions,
preventing affected devices from going into sleep.  Apply the upstream
patch that restores the old files for current kernels and renames the
new files for unreleased kernels.

https://gitlab.freedesktop.org/drm/amd/-/issues/5009
https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/935

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2026-03-05 00:30:06 -08:00
parent 80bdc1e5ce
commit ceb4778d67
@@ -1,6 +1,7 @@
{
stdenvNoCC,
fetchFromGitLab,
fetchpatch,
lib,
python3,
rdfind,
@@ -31,6 +32,15 @@ stdenvNoCC.mkDerivation rec {
hash = "sha256-QHoS9+WS9IjRVhTJEFF/X8+4ZKjKwpJAvf7EqsV+qEY=";
};
patches = [
# amdnpu: Restore old NPU firmware for compatibility
# https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/935
(fetchpatch {
url = "https://gitlab.com/kernel-firmware/linux-firmware/-/commit/58cf579b98c0c4878deeda1acb5db70e699875b5.patch";
hash = "sha256-2UO9CxGM2Asb/fRAST4zRlMBSVjM+N/87NzSkSoQrQ0=";
})
];
postUnpack = ''
patchShebangs .
'';