1 { config, lib, pkgs, ... }:
4 cfg = config.hardware.amdgpu;
6 options.hardware.amdgpu = {
7 legacySupport.enable = lib.mkEnableOption ''
8 using `amdgpu` kernel driver instead of `radeon` for Southern Islands
9 (Radeon HD 7000) series and Sea Islands (Radeon HD 8000)
10 series cards. Note: this removes support for analog video outputs,
11 which is only available in the `radeon` driver
13 initrd.enable = lib.mkEnableOption ''
14 loading `amdgpu` kernelModule in stage 1.
15 Can fix lower resolution in boot screen during initramfs phase
17 opencl.enable = lib.mkEnableOption ''OpenCL support using ROCM runtime library'';
18 # cfg.amdvlk option is defined in ./amdvlk.nix module
22 boot.kernelParams = lib.optionals cfg.legacySupport.enable [
24 "amdgpu.cik_support=1"
26 "radeon.cik_support=0"
29 boot.initrd.kernelModules = lib.optionals cfg.initrd.enable [ "amdgpu" ];
31 hardware.graphics = lib.mkIf cfg.opencl.enable {
32 enable = lib.mkDefault true;
35 pkgs.rocmPackages.clr.icd
41 maintainers = with lib.maintainers; [ johnrtitor ];