Commit ceb4778d authored by Anders Kaseorg's avatar Anders Kaseorg
Browse files

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: default avatarAnders Kaseorg <andersk@mit.edu>
parent 80bdc1e5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
{
  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 .
  '';