Compare commits

...

2 Commits

Author SHA1 Message Date
chn
926ce8cc2d modules.system.kernel: remove unused patch 2024-09-26 09:52:38 +08:00
chn
a312f6c06b fix build 2024-09-26 00:10:48 +08:00
8 changed files with 12 additions and 72 deletions

View File

@ -49,7 +49,7 @@ inputs:
kernel =
{
variant = "xanmod-latest";
patches = [ "hibernate-progress" "amdgpu" ];
patches = [ "hibernate-progress" ];
modules.modprobeConfig =
[ "options iwlwifi power_save=0" "options iwlmvm power_scheme=1" "options iwlwifi uapsd_disable=1" ];
};

View File

@ -1291,11 +1291,11 @@
"treefmt-nix": "treefmt-nix_5"
},
"locked": {
"lastModified": 1725358301,
"narHash": "sha256-clY4INR7RjOVKya3FGNYvOhyFyUhd3dGQsnV2Za3rz0=",
"lastModified": 1727277425,
"narHash": "sha256-AkYXR8hhAcijhJFYu71+xkdkfTUKOM9ROjYwx5zIsdY=",
"owner": "CHN-beta",
"repo": "poetry2nix",
"rev": "1f803d2b2faa5b785dfd2fafe99b2411731bf08c",
"rev": "4d1c8dea2d0e3a81208d8598a1a776e65f71d73f",
"type": "github"
},
"original": {

View File

@ -7,4 +7,5 @@
sha256 = "0faahbzsr44bjmwr6508wi5hg59dfb57fzh5x6jh7zwmv4pzhqlb";
fetchLFS = true;
};
git-lfs-transfer = "sha256-AXXYo00ewbg656KiDasHrf3Krh6ZPUabmB3De090zCw=";
}

View File

@ -33,18 +33,7 @@ inputs:
enable = true;
# TCP 139 445 UDP 137 138
openFirewall = !samba.private;
securityType = "user";
settings =
{
workgroup = "WORKGROUP";
"server string" = "Samba Server";
"server role" = "standalone server";
"hosts allow" = "${samba.hostsAllowed}";
"dns proxy" = "no";
};
# obey pam restrictions = yes
# encrypt passwords = no
shares = listToAttrs (map
settings = listToAttrs (map
(share:
{
name = share.name;
@ -60,7 +49,8 @@ inputs:
"force directory mode" = "2755";
};
})
(attrsToList samba.shares));
(attrsToList samba.shares))
// { global."hosts allow" = "${samba.hostsAllowed}"; };
};
};
nixos.services.xray.client.v2ray-forwarder =

View File

@ -1,47 +0,0 @@
From 123c4d46272b7e72d7db3fe8b4131a8cc99613fb Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Wed, 14 Aug 2024 10:28:24 -0400
Subject: [PATCH] drm/amdgpu/sdma5.2: limit wptr workaround to sdma 5.2.1
The workaround seems to cause stability issues on other
SDMA 5.2.x IPs.
Fixes: a03ebf116303 ("drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3556
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
index d740255edf5a..bc9b240a3488 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
@@ -225,14 +225,16 @@ static void sdma_v5_2_ring_set_wptr(struct amdgpu_ring *ring)
DRM_DEBUG("calling WDOORBELL64(0x%08x, 0x%016llx)\n",
ring->doorbell_index, ring->wptr << 2);
WDOORBELL64(ring->doorbell_index, ring->wptr << 2);
- /* SDMA seems to miss doorbells sometimes when powergating kicks in.
- * Updating the wptr directly will wake it. This is only safe because
- * we disallow gfxoff in begin_use() and then allow it again in end_use().
- */
- WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR),
- lower_32_bits(ring->wptr << 2));
- WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR_HI),
- upper_32_bits(ring->wptr << 2));
+ if (amdgpu_ip_version(adev, SDMA0_HWIP, 0) == IP_VERSION(5, 2, 1)) {
+ /* SDMA seems to miss doorbells sometimes when powergating kicks in.
+ * Updating the wptr directly will wake it. This is only safe because
+ * we disallow gfxoff in begin_use() and then allow it again in end_use().
+ */
+ WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR),
+ lower_32_bits(ring->wptr << 2));
+ WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR_HI),
+ upper_32_bits(ring->wptr << 2));
+ }
} else {
DRM_DEBUG("Not using doorbell -- "
"mmSDMA%i_GFX_RB_WPTR == 0x%08x "
--
2.46.0

View File

@ -142,11 +142,6 @@ inputs:
let version = inputs.lib.versions.majorMinor inputs.config.boot.kernelPackages.kernel.version;
in if version == "6.10" then ./btrfs.patch else null;
}];
amdgpu =
[{
name = "amdgpu";
patch = ./0001-drm-amdgpu-sdma5.2-limit-wptr-workaround-to-sdma-5.2.patch;
}];
};
in builtins.concatLists (builtins.map (name: patches.${name}) (kernel.patches ++ [ "btrfs" ]));
};

View File

@ -99,7 +99,8 @@ inputs: rec
chn-bsub = inputs.pkgs.callPackage ./chn-bsub { inherit biu; };
winjob = inputs.pkgs.callPackage ./winjob { stdenv = inputs.pkgs.gcc14Stdenv; };
sockpp = inputs.pkgs.callPackage ./sockpp.nix { src = inputs.topInputs.sockpp; };
git-lfs-transfer = inputs.pkgs.callPackage ./git-lfs-transfer.nix { src = inputs.topInputs.git-lfs-transfer; };
git-lfs-transfer = inputs.pkgs.callPackage ./git-lfs-transfer.nix
{ src = inputs.topInputs.git-lfs-transfer; hash = inputs.topInputs.self.src.git-lfs-transfer; };
py4vasp = inputs.pkgs.callPackage ./py4vasp.nix { src = inputs.topInputs.py4vasp; };
pocketfft = inputs.pkgs.callPackage ./pocketfft.nix { src = inputs.topInputs.pocketfft; };

View File

@ -1,6 +1,6 @@
{ buildGoModule, src }: buildGoModule
{ buildGoModule, src, hash }: buildGoModule
{
name = "git-lfs-transfer";
inherit src;
vendorHash = "sha256-DYupPz6VnFeFWG4helRv5ahbTDQk+6w6alxwNGU9B9Q=";
vendorHash = hash;
}