Merge #151019: amdgpu-pro: 17.40 -> 21.30

+189 -268
+24 -22
nixos/modules/hardware/video/amdgpu-pro.nix
··· 11 11 enabled = elem "amdgpu-pro" drivers; 12 12 13 13 package = config.boot.kernelPackages.amdgpu-pro; 14 - package32 = pkgs.pkgsi686Linux.linuxPackages.amdgpu-pro.override { libsOnly = true; kernel = null; }; 14 + package32 = pkgs.pkgsi686Linux.linuxPackages.amdgpu-pro.override { kernel = null; }; 15 15 16 16 opengl = config.hardware.opengl; 17 17 18 - kernel = pkgs.linux_4_9.override { 19 - extraConfig = '' 20 - KALLSYMS_ALL y 21 - ''; 22 - }; 23 - 24 18 in 25 19 26 20 { 27 21 28 22 config = mkIf enabled { 29 23 30 - nixpkgs.config.xorg.abiCompat = "1.19"; 24 + nixpkgs.config.xorg.abiCompat = "1.20"; 31 25 32 26 services.xserver.drivers = singleton 33 27 { name = "amdgpu"; modules = [ package ]; display = true; }; ··· 36 30 hardware.opengl.package32 = package32; 37 31 hardware.opengl.setLdLibraryPath = true; 38 32 39 - boot.extraModulePackages = [ package ]; 33 + boot.extraModulePackages = [ package.kmod ]; 40 34 41 - boot.kernelPackages = 42 - pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor kernel); 43 - 44 - boot.blacklistedKernelModules = [ "radeon" ]; 35 + boot.kernelPackages = pkgs.linuxKernel.packagesFor 36 + (pkgs.linuxKernel.kernels.linux_5_10.override { 37 + structuredExtraConfig = { 38 + DEVICE_PRIVATE = kernel.yes; 39 + KALLSYMS_ALL = kernel.yes; 40 + }; 41 + }); 45 42 46 - hardware.firmware = [ package ]; 43 + hardware.firmware = [ package.fw ]; 47 44 48 45 system.activationScripts.setup-amdgpu-pro = '' 49 - mkdir -p /run/lib 50 - ln -sfn ${package}/lib ${package.libCompatDir} 51 - ln -sfn ${package} /run/amdgpu-pro 52 - '' + optionalString opengl.driSupport32Bit '' 53 - ln -sfn ${package32}/lib ${package32.libCompatDir} 46 + ln -sfn ${package}/opt/amdgpu{,-pro} /run 54 47 ''; 55 48 56 49 system.requiredKernelConfig = with config.lib.kernelConfig; [ 50 + (isYes "DEVICE_PRIVATE") 57 51 (isYes "KALLSYMS_ALL") 58 52 ]; 59 53 54 + boot.initrd.extraUdevRulesCommands = '' 55 + cp -v ${package}/etc/udev/rules.d/*.rules $out/ 56 + ''; 57 + 58 + environment.systemPackages = 59 + [ package.vulkan ] ++ 60 + # this isn't really DRI, but we'll reuse this option for now 61 + optional config.hardware.opengl.driSupport32Bit package32.vulkan; 62 + 60 63 environment.etc = { 61 - "amd/amdrc".source = package + "/etc/amd/amdrc"; 62 - "amd/amdapfxx.blb".source = package + "/etc/amd/amdapfxx.blb"; 63 - "gbm/gbm.conf".source = package + "/etc/gbm/gbm.conf"; 64 + "modprobe.d/blacklist-radeon.conf".source = package + "/etc/modprobe.d/blacklist-radeon.conf"; 65 + amd.source = package + "/etc/amd"; 64 66 }; 65 67 66 68 };
+1 -1
nixos/modules/services/x11/xserver.nix
··· 703 703 704 704 environment = 705 705 optionalAttrs config.hardware.opengl.setLdLibraryPath 706 - { LD_LIBRARY_PATH = pkgs.addOpenGLRunpath.driverLink; } 706 + { LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.addOpenGLRunpath.driverLink ]; } 707 707 // cfg.displayManager.job.environment; 708 708 709 709 preStart =
+155 -118
pkgs/os-specific/linux/amdgpu-pro/default.nix
··· 1 - { lib, stdenv, fetchurl, elfutils 2 - , xorg, patchelf, openssl, libdrm, udev 3 - , libxcb, libxshmfence, libepoxy, perl, zlib 4 - , ncurses 5 - , libsOnly ? false, kernel ? null 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , elfutils 5 + , xorg 6 + , patchelf 7 + , libxcb 8 + , libxshmfence 9 + , perl 10 + , zlib 11 + , expat 12 + , libffi 13 + , libselinux 14 + , udev 15 + , kernel ? null 6 16 }: 7 17 8 - assert (!libsOnly) -> kernel != null; 9 - 10 18 with lib; 11 19 12 20 let 13 21 14 - kernelDir = if libsOnly then null else kernel.dev; 15 - 16 22 bitness = if stdenv.is64bit then "64" else "32"; 17 23 18 24 libArch = ··· 20 26 "i386-linux-gnu" 21 27 else if stdenv.hostPlatform.system == "x86_64-linux" then 22 28 "x86_64-linux-gnu" 23 - else throw "amdgpu-pro is Linux only. Sorry. The build was stopped."; 24 - 25 - libReplaceDir = "/usr/lib/${libArch}"; 26 - 27 - ncurses5 = ncurses.override { abiVersion = "5"; }; 29 + else throw "amdgpu-pro is Linux only. Sorry."; 28 30 29 31 in stdenv.mkDerivation rec { 30 32 31 - version = "17.40"; 33 + version = "21.30"; 32 34 pname = "amdgpu-pro"; 33 - build = "${version}-492261"; 34 - 35 - libCompatDir = "/run/lib/${libArch}"; 36 - 37 - name = pname + "-" + version + (optionalString (!libsOnly) "-${kernelDir.version}"); 35 + build = "${version}-1290604"; 38 36 39 37 src = fetchurl { 40 - url = 41 - "https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-${build}.tar.xz"; 42 - sha256 = "1c073lp9cq1rc2mddky2r0j2dv9dd167qj02visz37vwaxbm2r5h"; 43 - curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMD-Radeon-GPU-PRO-Linux-Beta-Driver%e2%80%93Release-Notes.aspx"; 38 + url = "https://drivers.amd.com/drivers/linux/amdgpu-pro-${build}-ubuntu-20.04.tar.xz"; 39 + sha256 = "sha256-WECqxjo2WLP3kMWeVyJgYufkvHTzwGaj57yeMGXiQ4I="; 40 + curlOpts = "--referer https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-30"; 44 41 }; 45 42 46 - hardeningDisable = [ "pic" "format" ]; 47 - 48 - inherit libsOnly; 49 - 50 43 postUnpack = '' 51 - cd $sourceRoot 52 44 mkdir root 53 - cd root 54 - for deb in ../*_all.deb ../*_i386.deb '' + optionalString stdenv.is64bit "../*_amd64.deb" + ''; do echo $deb; ar p $deb data.tar.xz | tar -xJ; done 55 - sourceRoot=. 56 - ''; 57 - 58 - modulePatches = optionals (!libsOnly) ([ 59 - ./patches/0001-fix-warnings-for-Werror.patch 60 - ./patches/0002-fix-sketchy-int-ptr-warning.patch 61 - ./patches/0003-disable-firmware-copy.patch 62 - ]); 63 - 64 - patchPhase = optionalString (!libsOnly) '' 65 - pushd usr/src/amdgpu-${build} 66 - for patch in $modulePatches 45 + pushd $sourceRoot 46 + for deb in *_all.deb *_${if stdenv.is64bit then "amd64" else "i386"}.deb 67 47 do 68 - echo $patch 69 - patch -f -p1 < $patch || true 48 + ar p $deb data.tar.xz | tar -C ../root -xJ 70 49 done 71 50 popd 51 + # if we don't use a short sourceRoot, compilation can fail due to command 52 + # line length 53 + sourceRoot=root 72 54 ''; 73 55 74 - xreallocarray = ./xreallocarray.c; 56 + passthru = optionalAttrs (kernel != null) { 57 + kmod = stdenv.mkDerivation rec { 58 + inherit version src postUnpack; 59 + name = "${pname}-${version}-kmod-${kernel.dev.version}"; 75 60 76 - preBuild = optionalString (!libsOnly) '' 77 - pushd usr/src/amdgpu-${build} 78 - makeFlags="$makeFlags M=$(pwd)" 79 - patchShebangs pre-build.sh 80 - ./pre-build.sh ${kernel.version} 81 - popd 82 - pushd lib 83 - $CC -fPIC -shared -o libhack-xreallocarray.so $xreallocarray 84 - strip libhack-xreallocarray.so 85 - popd 86 - ''; 61 + postPatch = '' 62 + pushd usr/src/amdgpu-* 63 + patchShebangs amd/dkms/*.sh 64 + substituteInPlace amd/dkms/pre-build.sh --replace "./configure" "./configure --with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source --with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 65 + popd 66 + ''; 87 67 88 - modules = [ 89 - "amd/amdgpu/amdgpu.ko" 90 - "amd/amdkcl/amdkcl.ko" 91 - "ttm/amdttm.ko" 92 - ]; 68 + preConfigure = '' 69 + pushd usr/src/amdgpu-* 70 + makeFlags="$makeFlags M=$(pwd)" 71 + amd/dkms/pre-build.sh ${kernel.version} 72 + popd 73 + ''; 93 74 94 - postBuild = optionalString (!libsOnly) 95 - (concatMapStrings (m: "xz usr/src/amdgpu-${build}/${m}\n") modules); 75 + postBuild = '' 76 + pushd usr/src/amdgpu-* 77 + find -name \*.ko -exec xz {} \; 78 + popd 79 + ''; 80 + 81 + makeFlags = optionalString (kernel != null) "-C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build modules"; 82 + 83 + installPhase = '' 84 + runHook preInstall 85 + 86 + pushd usr/src/amdgpu-* 87 + find -name \*.ko.xz -exec install -Dm444 {} $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/{} \; 88 + popd 89 + 90 + runHook postInstall 91 + ''; 92 + 93 + # without this we get a collision with the ttm module from linux 94 + meta.priority = 4; 95 + }; 96 + 97 + fw = stdenv.mkDerivation rec { 98 + inherit version src postUnpack; 99 + name = "${pname}-${version}-fw"; 100 + 101 + installPhase = '' 102 + runHook preInstall 103 + 104 + mkdir -p $out/lib 105 + cp -r usr/src/amdgpu-*/firmware $out/lib/firmware 96 106 97 - NIX_CFLAGS_COMPILE = "-Werror"; 107 + runHook postInstall 108 + ''; 109 + }; 110 + }; 98 111 99 - makeFlags = optionalString (!libsOnly) 100 - "-C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build modules"; 112 + outputs = [ "out" "vulkan" ]; 101 113 102 114 depLibPath = makeLibraryPath [ 103 - stdenv.cc.cc.lib xorg.libXext xorg.libX11 xorg.libXdamage xorg.libXfixes zlib 104 - xorg.libXxf86vm libxcb libxshmfence libepoxy openssl libdrm elfutils udev ncurses5 115 + stdenv.cc.cc.lib 116 + zlib 117 + libxcb 118 + libxshmfence 119 + elfutils 120 + expat 121 + libffi 122 + libselinux 123 + # libudev is not listed in any dependencies, but is loaded dynamically 124 + udev 125 + xorg.libXext 126 + xorg.libX11 127 + xorg.libXfixes 128 + xorg.libXdamage 129 + xorg.libXxf86vm 105 130 ]; 106 131 107 132 installPhase = '' 133 + runHook preInstall 134 + 108 135 mkdir -p $out 109 136 110 - cp -r etc $out/etc 111 - cp -r lib $out/lib 137 + cp -r usr/lib/${libArch} $out/lib 138 + cp -r usr/share $out/share 112 139 113 - pushd usr 114 - cp -r lib/${libArch}/* $out/lib 115 - '' + optionalString (!libsOnly) '' 116 - cp -r src/amdgpu-${build}/firmware $out/lib/firmware 117 - '' + '' 118 - cp -r share $out/share 140 + mkdir -p $out/opt/amdgpu{,-pro} 141 + cp -r opt/amdgpu-pro/lib/${libArch} $out/opt/amdgpu-pro/lib 142 + cp -r opt/amdgpu/lib/${libArch} $out/opt/amdgpu/lib 143 + 144 + pushd $out/lib 145 + ln -s ../opt/amdgpu-pro/lib/libGL.so* . 146 + ln -s ../opt/amdgpu-pro/lib/libEGL.so* . 119 147 popd 120 148 121 - pushd opt/amdgpu-pro 122 - '' + optionalString (!libsOnly && stdenv.is64bit) '' 123 - cp -r bin $out/bin 124 - '' + '' 125 - cp -r include $out/include 126 - cp -r share/* $out/share 127 - cp -r lib/${libArch}/* $out/lib 128 - '' + optionalString (!libsOnly) '' 129 - mv lib/xorg $out/lib/xorg 130 - '' + '' 149 + # short name to allow replacement below 150 + ln -s lib/dri $out/dri 151 + 152 + '' + optionalString (stdenv.is64bit) '' 153 + mkdir -p $out/etc 154 + pushd etc 155 + cp -r modprobe.d udev amd $out/etc 131 156 popd 132 157 133 - '' + optionalString (!libsOnly) 134 - (concatMapStrings (m: 135 - "install -Dm444 usr/src/amdgpu-${build}/${m}.xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/${m}.xz\n") modules) 136 - + '' 137 - mv $out/etc/vulkan $out/share 138 - interpreter="$(cat $NIX_CC/nix-support/dynamic-linker)" 139 - libPath="$out/lib:$out/lib/gbm:$depLibPath" 140 - '' + optionalString (!libsOnly && stdenv.is64bit) '' 141 - for prog in clinfo modetest vbltest kms-universal-planes kms-steal-crtc modeprint amdgpu_test kmstest proptest; do 142 - patchelf --interpreter "$interpreter" --set-rpath "$libPath" "$out/bin/$prog" 143 - done 158 + cp -r lib/udev/rules.d/* $out/etc/udev/rules.d 159 + cp -r opt/amdgpu/lib/xorg $out/lib/xorg 160 + cp -r opt/amdgpu-pro/lib/xorg/* $out/lib/xorg 161 + cp -r opt/amdgpu/share $out/opt/amdgpu/share 144 162 '' + '' 145 - ln -s ${makeLibraryPath [ncurses5]}/libncursesw.so.5 $out/lib/libtinfo.so.5 163 + 164 + mkdir -p $vulkan/share/vulkan/icd.d 165 + install opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd${bitness}.json $vulkan/share/vulkan/icd.d 166 + 167 + runHook postInstall 146 168 ''; 147 169 148 - # we'll just set the full rpath on everything to avoid having to track down dlopen problems 149 - postFixup = assert (stringLength libReplaceDir == stringLength libCompatDir); '' 150 - libPath="$out/lib:$out/lib/gbm:$depLibPath" 151 - for lib in `find "$out/lib/" -name '*.so*' -type f`; do 152 - patchelf --set-rpath "$libPath" "$lib" 153 - done 154 - for lib in libEGL.so.1 libGL.so.1.2 ${optionalString (!libsOnly) "xorg/modules/extensions/libglx.so"} dri/amdgpu_dri.so libamdocl${bitness}.so; do 155 - perl -pi -e 's:${libReplaceDir}:${libCompatDir}:g' "$out/lib/$lib" 156 - done 157 - for lib in dri/amdgpu_dri.so libdrm_amdgpu.so.1.0.0 libgbm_amdgpu.so.1.0.0 libkms_amdgpu.so.1.0.0 libamdocl${bitness}.so; do 158 - perl -pi -e 's:/opt/amdgpu-pro/:/run/amdgpu-pro/:g' "$out/lib/$lib" 159 - done 160 - substituteInPlace "$out/share/vulkan/icd.d/amd_icd${bitness}.json" --replace "/opt/amdgpu-pro/lib/${libArch}" "$out/lib" 161 - '' + optionalString (!libsOnly) '' 162 - for lib in drivers/modesetting_drv.so libglamoregl.so; do 163 - patchelf --add-needed $out/lib/libhack-xreallocarray.so $out/lib/xorg/modules/$lib 164 - done 170 + preFixup = (if stdenv.is64bit 171 + # this could also be done with LIBGL_DRIVERS_PATH, but it would need to be 172 + # set in the user session and for Xorg 173 + then '' 174 + expr1='s:/opt/amdgpu/lib/x86_64-linux-gnu/dri\0:/run/opengl-driver/lib/dri\0\0\0\0\0\0\0\0\0\0\0:g' 175 + expr2='s:/usr/lib/x86_64-linux-gnu/dri[\0\:]:/run/opengl-driver/lib/dri\0\0\0\0:g' 176 + perl -pi -e "$expr2" $out/lib/xorg/modules/extensions/libglx.so 177 + '' 178 + else '' 179 + expr1='s:/opt/amdgpu/lib/i386-linux-gnu/dri\0:/run/opengl-driver-32/lib/dri\0\0\0\0\0\0:g' 180 + # we replace a different path on 32-bit because it's the only one long 181 + # enough to fit the target path :( 182 + expr2='s:/usr/lib/i386-linux-gnu/dri[\0\:]:/run/opengl-driver-32/dri\0\0\0:g' 183 + '') + '' 184 + perl -pi -e "$expr1" \ 185 + $out/opt/amdgpu/lib/libEGL.so.1.0.0 \ 186 + $out/opt/amdgpu/lib/libgbm.so.1.0.0 \ 187 + $out/opt/amdgpu/lib/libGL.so.1.2.0 188 + 189 + perl -pi -e "$expr2" \ 190 + $out/opt/amdgpu-pro/lib/libEGL.so.1 \ 191 + $out/opt/amdgpu-pro/lib/libGL.so.1.2 \ 192 + $out/opt/amdgpu-pro/lib/libGLX_amd.so.0 193 + 194 + find $out -type f -exec perl -pi -e 's:/opt/amdgpu-pro/:/run/amdgpu-pro/:g' {} \; 195 + find $out -type f -exec perl -pi -e 's:/opt/amdgpu/:/run/amdgpu/:g' {} \; 196 + 197 + substituteInPlace $vulkan/share/vulkan/icd.d/*.json --replace /opt/amdgpu-pro/lib/${libArch} "$out/opt/amdgpu-pro/lib" 198 + ''; 199 + 200 + # doing this in post because shrinking breaks things that dynamically load 201 + postFixup = '' 202 + libPath="$out/opt/amdgpu/lib:$out/opt/amdgpu-pro/lib:$depLibPath" 203 + find "$out" -name '*.so*' -type f -exec patchelf --set-rpath "$libPath" {} \; 165 204 ''; 166 205 167 206 buildInputs = [ ··· 177 216 license = licenses.unfree; 178 217 platforms = platforms.linux; 179 218 maintainers = with maintainers; [ corngood ]; 180 - # Copied from the nvidia default.nix to prevent a store collision. 181 - priority = 4; 182 219 }; 183 220 }
-71
pkgs/os-specific/linux/amdgpu-pro/patches/0001-fix-warnings-for-Werror.patch
··· 1 - From 9167d76c435a7c1df7954f0fbe5cc6d083f8ed2f Mon Sep 17 00:00:00 2001 2 - From: David McFarland <corngood@gmail.com> 3 - Date: Mon, 6 Feb 2017 22:13:49 -0400 4 - Subject: [PATCH 1/3] fix warnings for Werror 5 - 6 - --- 7 - amd/amdgpu/amdgpu_device.c | 4 ++-- 8 - amd/amdgpu/amdgpu_sa.c | 2 +- 9 - amd/display/dc/bios/bios_parser2.c | 8 ++++---- 10 - 3 files changed, 7 insertions(+), 7 deletions(-) 11 - 12 - diff --git a/amd/amdgpu/amdgpu_device.c b/amd/amdgpu/amdgpu_device.c 13 - index fc1c543..186e06d 100644 14 - --- a/amd/amdgpu/amdgpu_device.c 15 - +++ b/amd/amdgpu/amdgpu_device.c 16 - @@ -3164,7 +3164,7 @@ void amdgpu_debugfs_cleanup(struct drm_minor *minor) 17 - struct drm_info_node *node, *tmp; 18 - 19 - if (!&minor->debugfs_root) 20 - - return 0; 21 - + return; 22 - 23 - mutex_lock(&minor->debugfs_lock); 24 - list_for_each_entry_safe(node, tmp, 25 - @@ -3175,7 +3175,7 @@ void amdgpu_debugfs_cleanup(struct drm_minor *minor) 26 - } 27 - mutex_unlock(&minor->debugfs_lock); 28 - 29 - - return 0; 30 - + return; 31 - } 32 - #endif 33 - 34 - diff --git a/amd/amdgpu/amdgpu_sa.c b/amd/amdgpu/amdgpu_sa.c 35 - index 7206b34..8b7123c 100644 36 - --- a/amd/amdgpu/amdgpu_sa.c 37 - +++ b/amd/amdgpu/amdgpu_sa.c 38 - @@ -430,7 +430,7 @@ void amdgpu_sa_bo_dump_debug_info(struct amdgpu_sa_manager *sa_manager, 39 - if (i->fence) 40 - #if defined(BUILD_AS_DKMS) 41 - seq_printf(m, " protected by 0x%08x on context %d", 42 - - i->fence->seqno, i->fence->context); 43 - + i->fence->seqno, (int)i->fence->context); 44 - #else 45 - seq_printf(m, " protected by 0x%08x on context %llu", 46 - i->fence->seqno, i->fence->context); 47 - diff --git a/amd/display/dc/bios/bios_parser2.c b/amd/display/dc/bios/bios_parser2.c 48 - index 86fce5a..99681c5 100644 49 - --- a/amd/display/dc/bios/bios_parser2.c 50 - +++ b/amd/display/dc/bios/bios_parser2.c 51 - @@ -1326,13 +1326,13 @@ static enum bp_result get_embedded_panel_info_v2_1( 52 - info->lcd_timing.misc_info.VERTICAL_CUT_OFF = 0; 53 - 54 - info->lcd_timing.misc_info.H_REPLICATION_BY2 = 55 - - lvds->lcd_timing.miscinfo & ATOM_H_REPLICATIONBY2; 56 - + (lvds->lcd_timing.miscinfo & ATOM_H_REPLICATIONBY2) != 0; 57 - info->lcd_timing.misc_info.V_REPLICATION_BY2 = 58 - - lvds->lcd_timing.miscinfo & ATOM_V_REPLICATIONBY2; 59 - + (lvds->lcd_timing.miscinfo & ATOM_V_REPLICATIONBY2) != 0; 60 - info->lcd_timing.misc_info.COMPOSITE_SYNC = 61 - - lvds->lcd_timing.miscinfo & ATOM_COMPOSITESYNC; 62 - + (lvds->lcd_timing.miscinfo & ATOM_COMPOSITESYNC) != 0; 63 - info->lcd_timing.misc_info.INTERLACE = 64 - - lvds->lcd_timing.miscinfo & ATOM_INTERLACE; 65 - + (lvds->lcd_timing.miscinfo & ATOM_INTERLACE) != 0; 66 - 67 - /* not provided by VBIOS*/ 68 - info->lcd_timing.misc_info.DOUBLE_CLOCK = 0; 69 - -- 70 - 2.15.1 71 -
-25
pkgs/os-specific/linux/amdgpu-pro/patches/0002-fix-sketchy-int-ptr-warning.patch
··· 1 - From a07ee5dec35ca24a013a6638543ef5030b2bab40 Mon Sep 17 00:00:00 2001 2 - From: David McFarland <corngood@gmail.com> 3 - Date: Tue, 9 Jan 2018 21:45:33 -0400 4 - Subject: [PATCH 2/3] fix sketchy int->ptr warning 5 - 6 - --- 7 - amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- 8 - 1 file changed, 1 insertion(+), 1 deletion(-) 9 - 10 - diff --git a/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/amd/display/amdgpu_dm/amdgpu_dm_helpers.c 11 - index d0f091b..707815a 100644 12 - --- a/amd/display/amdgpu_dm/amdgpu_dm_helpers.c 13 - +++ b/amd/display/amdgpu_dm/amdgpu_dm_helpers.c 14 - @@ -236,7 +236,7 @@ bool dm_helpers_dp_mst_write_payload_allocation_table( 15 - pbn = drm_dp_calc_pbn_mode(clock, bpp); 16 - 17 - slots = drm_dp_find_vcpi_slots(mst_mgr, pbn); 18 - - ret = drm_dp_mst_allocate_vcpi(mst_mgr, mst_port, pbn, slots); 19 - + ret = drm_dp_mst_allocate_vcpi(mst_mgr, mst_port, pbn, &slots); 20 - 21 - if (!ret) 22 - return false; 23 - -- 24 - 2.15.1 25 -
-25
pkgs/os-specific/linux/amdgpu-pro/patches/0003-disable-firmware-copy.patch
··· 1 - From 7a3062acbbabdb29239bbc8c984e62589a88576e Mon Sep 17 00:00:00 2001 2 - From: David McFarland <corngood@gmail.com> 3 - Date: Tue, 9 Jan 2018 21:49:55 -0400 4 - Subject: [PATCH 3/3] disable firmware copy 5 - 6 - --- 7 - pre-build.sh | 5 ----- 8 - 1 file changed, 5 deletions(-) 9 - 10 - diff --git a/pre-build.sh b/pre-build.sh 11 - index e7b8a32..bad8f25 100755 12 - --- a/pre-build.sh 13 - +++ b/pre-build.sh 14 - @@ -38,8 +38,3 @@ find ttm -name '*.c' -exec grep EXPORT_SYMBOL {} + \ 15 - | sort -u \ 16 - | awk -F'[()]' '{print "#define "$2" amd"$2" //"$0}'\ 17 - >> include/rename_symbol.h 18 - - 19 - -FW_DIR="/lib/firmware/$KERNELVER" 20 - -mkdir -p $FW_DIR 21 - -cp -ar /usr/src/amdgpu-17.40-492261/firmware/radeon $FW_DIR 22 - -cp -ar /usr/src/amdgpu-17.40-492261/firmware/amdgpu $FW_DIR 23 - -- 24 - 2.15.1 25 -
-5
pkgs/os-specific/linux/amdgpu-pro/xreallocarray.c
··· 1 - #include <malloc.h> 2 - 3 - void *xreallocarray(void *ptr, size_t nmemb, size_t size) { 4 - return reallocarray(ptr, nmemb, size); 5 - }
+9 -1
pkgs/top-level/linux-kernels.nix
··· 248 248 249 249 akvcam = callPackage ../os-specific/linux/akvcam { }; 250 250 251 - amdgpu-pro = callPackage ../os-specific/linux/amdgpu-pro { }; 251 + amdgpu-pro = callPackage ../os-specific/linux/amdgpu-pro { 252 + libffi = pkgs.libffi.overrideAttrs (orig: rec { 253 + version = "3.3"; 254 + src = fetchurl { 255 + url = "https://github.com/libffi/libffi/releases/download/v${version}/${orig.pname}-${version}.tar.gz"; 256 + sha256 = "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj"; 257 + }; 258 + }); 259 + }; 252 260 253 261 anbox = callPackage ../os-specific/linux/anbox/kmod.nix { }; 254 262