Adding support for GV302X* 2023 (#1285)
This commit is contained in:
parent
b98df1827a
commit
d3b4fe46c8
5 changed files with 212 additions and 0 deletions
44
asus/flow/gv302x/amdgpu/default.nix
Normal file
44
asus/flow/gv302x/amdgpu/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkMerge;
|
||||
cfg = config.hardware.asus.flow.gv302x;
|
||||
|
||||
in {
|
||||
imports = [
|
||||
../shared.nix
|
||||
];
|
||||
|
||||
options.hardware.asus.flow.gv302x.amdgpu = {
|
||||
recovery.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = false; };
|
||||
sg_display.enable = (mkEnableOption "Enable amdgpu.gpu_recovery kernel boot param") // { default = true; };
|
||||
psr.enable = (mkEnableOption "Enable amdgpu.dcdebugmask=0x10 kernel boot param") // { default = true; };
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.amdgpu.recovery.enable {
|
||||
# Hopefully fixes for where the kernel sometimes hangs when suspending or hibernating
|
||||
# (Though, I'm very suspicious of the Mediatek Wifi...)
|
||||
boot.kernelParams = [
|
||||
"amdgpu.gpu_recovery=1"
|
||||
];
|
||||
})
|
||||
|
||||
(mkIf (!cfg.amdgpu.sg_display.enable) {
|
||||
# Can help solve flickering/glitching display issues since Scatter/Gather code was reenabled
|
||||
boot.kernelParams = [
|
||||
"amdgpu.sg_display=0"
|
||||
];
|
||||
})
|
||||
|
||||
(mkIf (!cfg.amdgpu.psr.enable) {
|
||||
# Can help solve flickering/glitching display issues since Scatter/Gather code was reenabled
|
||||
boot.kernelParams = [
|
||||
"amdgpu.dcdebugmask=0x10"
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue