Merge #151019: amdgpu-pro: 17.40 -> 21.30
This commit is contained in:
commit
d856f24d3c
@ -11,23 +11,17 @@ let
|
|||||||
enabled = elem "amdgpu-pro" drivers;
|
enabled = elem "amdgpu-pro" drivers;
|
||||||
|
|
||||||
package = config.boot.kernelPackages.amdgpu-pro;
|
package = config.boot.kernelPackages.amdgpu-pro;
|
||||||
package32 = pkgs.pkgsi686Linux.linuxPackages.amdgpu-pro.override { libsOnly = true; kernel = null; };
|
package32 = pkgs.pkgsi686Linux.linuxPackages.amdgpu-pro.override { kernel = null; };
|
||||||
|
|
||||||
opengl = config.hardware.opengl;
|
opengl = config.hardware.opengl;
|
||||||
|
|
||||||
kernel = pkgs.linux_4_9.override {
|
|
||||||
extraConfig = ''
|
|
||||||
KALLSYMS_ALL y
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
config = mkIf enabled {
|
config = mkIf enabled {
|
||||||
|
|
||||||
nixpkgs.config.xorg.abiCompat = "1.19";
|
nixpkgs.config.xorg.abiCompat = "1.20";
|
||||||
|
|
||||||
services.xserver.drivers = singleton
|
services.xserver.drivers = singleton
|
||||||
{ name = "amdgpu"; modules = [ package ]; display = true; };
|
{ name = "amdgpu"; modules = [ package ]; display = true; };
|
||||||
@ -36,31 +30,39 @@ in
|
|||||||
hardware.opengl.package32 = package32;
|
hardware.opengl.package32 = package32;
|
||||||
hardware.opengl.setLdLibraryPath = true;
|
hardware.opengl.setLdLibraryPath = true;
|
||||||
|
|
||||||
boot.extraModulePackages = [ package ];
|
boot.extraModulePackages = [ package.kmod ];
|
||||||
|
|
||||||
boot.kernelPackages =
|
boot.kernelPackages = pkgs.linuxKernel.packagesFor
|
||||||
pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor kernel);
|
(pkgs.linuxKernel.kernels.linux_5_10.override {
|
||||||
|
structuredExtraConfig = {
|
||||||
|
DEVICE_PRIVATE = kernel.yes;
|
||||||
|
KALLSYMS_ALL = kernel.yes;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
boot.blacklistedKernelModules = [ "radeon" ];
|
hardware.firmware = [ package.fw ];
|
||||||
|
|
||||||
hardware.firmware = [ package ];
|
|
||||||
|
|
||||||
system.activationScripts.setup-amdgpu-pro = ''
|
system.activationScripts.setup-amdgpu-pro = ''
|
||||||
mkdir -p /run/lib
|
ln -sfn ${package}/opt/amdgpu{,-pro} /run
|
||||||
ln -sfn ${package}/lib ${package.libCompatDir}
|
|
||||||
ln -sfn ${package} /run/amdgpu-pro
|
|
||||||
'' + optionalString opengl.driSupport32Bit ''
|
|
||||||
ln -sfn ${package32}/lib ${package32.libCompatDir}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.requiredKernelConfig = with config.lib.kernelConfig; [
|
system.requiredKernelConfig = with config.lib.kernelConfig; [
|
||||||
|
(isYes "DEVICE_PRIVATE")
|
||||||
(isYes "KALLSYMS_ALL")
|
(isYes "KALLSYMS_ALL")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
boot.initrd.extraUdevRulesCommands = ''
|
||||||
|
cp -v ${package}/etc/udev/rules.d/*.rules $out/
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.systemPackages =
|
||||||
|
[ package.vulkan ] ++
|
||||||
|
# this isn't really DRI, but we'll reuse this option for now
|
||||||
|
optional config.hardware.opengl.driSupport32Bit package32.vulkan;
|
||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"amd/amdrc".source = package + "/etc/amd/amdrc";
|
"modprobe.d/blacklist-radeon.conf".source = package + "/etc/modprobe.d/blacklist-radeon.conf";
|
||||||
"amd/amdapfxx.blb".source = package + "/etc/amd/amdapfxx.blb";
|
amd.source = package + "/etc/amd";
|
||||||
"gbm/gbm.conf".source = package + "/etc/gbm/gbm.conf";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -703,7 +703,7 @@ in
|
|||||||
|
|
||||||
environment =
|
environment =
|
||||||
optionalAttrs config.hardware.opengl.setLdLibraryPath
|
optionalAttrs config.hardware.opengl.setLdLibraryPath
|
||||||
{ LD_LIBRARY_PATH = pkgs.addOpenGLRunpath.driverLink; }
|
{ LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.addOpenGLRunpath.driverLink ]; }
|
||||||
// cfg.displayManager.job.environment;
|
// cfg.displayManager.job.environment;
|
||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
|
@ -1,18 +1,24 @@
|
|||||||
{ lib, stdenv, fetchurl, elfutils
|
{ lib
|
||||||
, xorg, patchelf, openssl, libdrm, udev
|
, stdenv
|
||||||
, libxcb, libxshmfence, libepoxy, perl, zlib
|
, fetchurl
|
||||||
, ncurses
|
, elfutils
|
||||||
, libsOnly ? false, kernel ? null
|
, xorg
|
||||||
|
, patchelf
|
||||||
|
, libxcb
|
||||||
|
, libxshmfence
|
||||||
|
, perl
|
||||||
|
, zlib
|
||||||
|
, expat
|
||||||
|
, libffi
|
||||||
|
, libselinux
|
||||||
|
, udev
|
||||||
|
, kernel ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert (!libsOnly) -> kernel != null;
|
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
kernelDir = if libsOnly then null else kernel.dev;
|
|
||||||
|
|
||||||
bitness = if stdenv.is64bit then "64" else "32";
|
bitness = if stdenv.is64bit then "64" else "32";
|
||||||
|
|
||||||
libArch =
|
libArch =
|
||||||
@ -20,148 +26,181 @@ let
|
|||||||
"i386-linux-gnu"
|
"i386-linux-gnu"
|
||||||
else if stdenv.hostPlatform.system == "x86_64-linux" then
|
else if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||||
"x86_64-linux-gnu"
|
"x86_64-linux-gnu"
|
||||||
else throw "amdgpu-pro is Linux only. Sorry. The build was stopped.";
|
else throw "amdgpu-pro is Linux only. Sorry.";
|
||||||
|
|
||||||
libReplaceDir = "/usr/lib/${libArch}";
|
|
||||||
|
|
||||||
ncurses5 = ncurses.override { abiVersion = "5"; };
|
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
version = "17.40";
|
version = "21.30";
|
||||||
pname = "amdgpu-pro";
|
pname = "amdgpu-pro";
|
||||||
build = "${version}-492261";
|
build = "${version}-1290604";
|
||||||
|
|
||||||
libCompatDir = "/run/lib/${libArch}";
|
|
||||||
|
|
||||||
name = pname + "-" + version + (optionalString (!libsOnly) "-${kernelDir.version}");
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url =
|
url = "https://drivers.amd.com/drivers/linux/amdgpu-pro-${build}-ubuntu-20.04.tar.xz";
|
||||||
"https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-${build}.tar.xz";
|
sha256 = "sha256-WECqxjo2WLP3kMWeVyJgYufkvHTzwGaj57yeMGXiQ4I=";
|
||||||
sha256 = "1c073lp9cq1rc2mddky2r0j2dv9dd167qj02visz37vwaxbm2r5h";
|
curlOpts = "--referer https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-30";
|
||||||
curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMD-Radeon-GPU-PRO-Linux-Beta-Driver%e2%80%93Release-Notes.aspx";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hardeningDisable = [ "pic" "format" ];
|
|
||||||
|
|
||||||
inherit libsOnly;
|
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
cd $sourceRoot
|
|
||||||
mkdir root
|
mkdir root
|
||||||
cd root
|
pushd $sourceRoot
|
||||||
for deb in ../*_all.deb ../*_i386.deb '' + optionalString stdenv.is64bit "../*_amd64.deb" + ''; do echo $deb; ar p $deb data.tar.xz | tar -xJ; done
|
for deb in *_all.deb *_${if stdenv.is64bit then "amd64" else "i386"}.deb
|
||||||
sourceRoot=.
|
|
||||||
'';
|
|
||||||
|
|
||||||
modulePatches = optionals (!libsOnly) ([
|
|
||||||
./patches/0001-fix-warnings-for-Werror.patch
|
|
||||||
./patches/0002-fix-sketchy-int-ptr-warning.patch
|
|
||||||
./patches/0003-disable-firmware-copy.patch
|
|
||||||
]);
|
|
||||||
|
|
||||||
patchPhase = optionalString (!libsOnly) ''
|
|
||||||
pushd usr/src/amdgpu-${build}
|
|
||||||
for patch in $modulePatches
|
|
||||||
do
|
do
|
||||||
echo $patch
|
ar p $deb data.tar.xz | tar -C ../root -xJ
|
||||||
patch -f -p1 < $patch || true
|
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
|
# if we don't use a short sourceRoot, compilation can fail due to command
|
||||||
|
# line length
|
||||||
|
sourceRoot=root
|
||||||
'';
|
'';
|
||||||
|
|
||||||
xreallocarray = ./xreallocarray.c;
|
passthru = optionalAttrs (kernel != null) {
|
||||||
|
kmod = stdenv.mkDerivation rec {
|
||||||
|
inherit version src postUnpack;
|
||||||
|
name = "${pname}-${version}-kmod-${kernel.dev.version}";
|
||||||
|
|
||||||
preBuild = optionalString (!libsOnly) ''
|
postPatch = ''
|
||||||
pushd usr/src/amdgpu-${build}
|
pushd usr/src/amdgpu-*
|
||||||
makeFlags="$makeFlags M=$(pwd)"
|
patchShebangs amd/dkms/*.sh
|
||||||
patchShebangs pre-build.sh
|
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"
|
||||||
./pre-build.sh ${kernel.version}
|
popd
|
||||||
popd
|
'';
|
||||||
pushd lib
|
|
||||||
$CC -fPIC -shared -o libhack-xreallocarray.so $xreallocarray
|
|
||||||
strip libhack-xreallocarray.so
|
|
||||||
popd
|
|
||||||
'';
|
|
||||||
|
|
||||||
modules = [
|
preConfigure = ''
|
||||||
"amd/amdgpu/amdgpu.ko"
|
pushd usr/src/amdgpu-*
|
||||||
"amd/amdkcl/amdkcl.ko"
|
makeFlags="$makeFlags M=$(pwd)"
|
||||||
"ttm/amdttm.ko"
|
amd/dkms/pre-build.sh ${kernel.version}
|
||||||
];
|
popd
|
||||||
|
'';
|
||||||
|
|
||||||
postBuild = optionalString (!libsOnly)
|
postBuild = ''
|
||||||
(concatMapStrings (m: "xz usr/src/amdgpu-${build}/${m}\n") modules);
|
pushd usr/src/amdgpu-*
|
||||||
|
find -name \*.ko -exec xz {} \;
|
||||||
|
popd
|
||||||
|
'';
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-Werror";
|
makeFlags = optionalString (kernel != null) "-C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build modules";
|
||||||
|
|
||||||
makeFlags = optionalString (!libsOnly)
|
installPhase = ''
|
||||||
"-C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build modules";
|
runHook preInstall
|
||||||
|
|
||||||
|
pushd usr/src/amdgpu-*
|
||||||
|
find -name \*.ko.xz -exec install -Dm444 {} $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/{} \;
|
||||||
|
popd
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
# without this we get a collision with the ttm module from linux
|
||||||
|
meta.priority = 4;
|
||||||
|
};
|
||||||
|
|
||||||
|
fw = stdenv.mkDerivation rec {
|
||||||
|
inherit version src postUnpack;
|
||||||
|
name = "${pname}-${version}-fw";
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/lib
|
||||||
|
cp -r usr/src/amdgpu-*/firmware $out/lib/firmware
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "vulkan" ];
|
||||||
|
|
||||||
depLibPath = makeLibraryPath [
|
depLibPath = makeLibraryPath [
|
||||||
stdenv.cc.cc.lib xorg.libXext xorg.libX11 xorg.libXdamage xorg.libXfixes zlib
|
stdenv.cc.cc.lib
|
||||||
xorg.libXxf86vm libxcb libxshmfence libepoxy openssl libdrm elfutils udev ncurses5
|
zlib
|
||||||
|
libxcb
|
||||||
|
libxshmfence
|
||||||
|
elfutils
|
||||||
|
expat
|
||||||
|
libffi
|
||||||
|
libselinux
|
||||||
|
# libudev is not listed in any dependencies, but is loaded dynamically
|
||||||
|
udev
|
||||||
|
xorg.libXext
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libXfixes
|
||||||
|
xorg.libXdamage
|
||||||
|
xorg.libXxf86vm
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
|
||||||
cp -r etc $out/etc
|
cp -r usr/lib/${libArch} $out/lib
|
||||||
cp -r lib $out/lib
|
cp -r usr/share $out/share
|
||||||
|
|
||||||
pushd usr
|
mkdir -p $out/opt/amdgpu{,-pro}
|
||||||
cp -r lib/${libArch}/* $out/lib
|
cp -r opt/amdgpu-pro/lib/${libArch} $out/opt/amdgpu-pro/lib
|
||||||
'' + optionalString (!libsOnly) ''
|
cp -r opt/amdgpu/lib/${libArch} $out/opt/amdgpu/lib
|
||||||
cp -r src/amdgpu-${build}/firmware $out/lib/firmware
|
|
||||||
'' + ''
|
pushd $out/lib
|
||||||
cp -r share $out/share
|
ln -s ../opt/amdgpu-pro/lib/libGL.so* .
|
||||||
|
ln -s ../opt/amdgpu-pro/lib/libEGL.so* .
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd opt/amdgpu-pro
|
# short name to allow replacement below
|
||||||
'' + optionalString (!libsOnly && stdenv.is64bit) ''
|
ln -s lib/dri $out/dri
|
||||||
cp -r bin $out/bin
|
|
||||||
'' + ''
|
'' + optionalString (stdenv.is64bit) ''
|
||||||
cp -r include $out/include
|
mkdir -p $out/etc
|
||||||
cp -r share/* $out/share
|
pushd etc
|
||||||
cp -r lib/${libArch}/* $out/lib
|
cp -r modprobe.d udev amd $out/etc
|
||||||
'' + optionalString (!libsOnly) ''
|
|
||||||
mv lib/xorg $out/lib/xorg
|
|
||||||
'' + ''
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
'' + optionalString (!libsOnly)
|
cp -r lib/udev/rules.d/* $out/etc/udev/rules.d
|
||||||
(concatMapStrings (m:
|
cp -r opt/amdgpu/lib/xorg $out/lib/xorg
|
||||||
"install -Dm444 usr/src/amdgpu-${build}/${m}.xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/${m}.xz\n") modules)
|
cp -r opt/amdgpu-pro/lib/xorg/* $out/lib/xorg
|
||||||
+ ''
|
cp -r opt/amdgpu/share $out/opt/amdgpu/share
|
||||||
mv $out/etc/vulkan $out/share
|
|
||||||
interpreter="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
|
||||||
libPath="$out/lib:$out/lib/gbm:$depLibPath"
|
|
||||||
'' + optionalString (!libsOnly && stdenv.is64bit) ''
|
|
||||||
for prog in clinfo modetest vbltest kms-universal-planes kms-steal-crtc modeprint amdgpu_test kmstest proptest; do
|
|
||||||
patchelf --interpreter "$interpreter" --set-rpath "$libPath" "$out/bin/$prog"
|
|
||||||
done
|
|
||||||
'' + ''
|
'' + ''
|
||||||
ln -s ${makeLibraryPath [ncurses5]}/libncursesw.so.5 $out/lib/libtinfo.so.5
|
|
||||||
|
mkdir -p $vulkan/share/vulkan/icd.d
|
||||||
|
install opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd${bitness}.json $vulkan/share/vulkan/icd.d
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# we'll just set the full rpath on everything to avoid having to track down dlopen problems
|
preFixup = (if stdenv.is64bit
|
||||||
postFixup = assert (stringLength libReplaceDir == stringLength libCompatDir); ''
|
# this could also be done with LIBGL_DRIVERS_PATH, but it would need to be
|
||||||
libPath="$out/lib:$out/lib/gbm:$depLibPath"
|
# set in the user session and for Xorg
|
||||||
for lib in `find "$out/lib/" -name '*.so*' -type f`; do
|
then ''
|
||||||
patchelf --set-rpath "$libPath" "$lib"
|
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'
|
||||||
done
|
expr2='s:/usr/lib/x86_64-linux-gnu/dri[\0\:]:/run/opengl-driver/lib/dri\0\0\0\0:g'
|
||||||
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
|
perl -pi -e "$expr2" $out/lib/xorg/modules/extensions/libglx.so
|
||||||
perl -pi -e 's:${libReplaceDir}:${libCompatDir}:g' "$out/lib/$lib"
|
''
|
||||||
done
|
else ''
|
||||||
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
|
expr1='s:/opt/amdgpu/lib/i386-linux-gnu/dri\0:/run/opengl-driver-32/lib/dri\0\0\0\0\0\0:g'
|
||||||
perl -pi -e 's:/opt/amdgpu-pro/:/run/amdgpu-pro/:g' "$out/lib/$lib"
|
# we replace a different path on 32-bit because it's the only one long
|
||||||
done
|
# enough to fit the target path :(
|
||||||
substituteInPlace "$out/share/vulkan/icd.d/amd_icd${bitness}.json" --replace "/opt/amdgpu-pro/lib/${libArch}" "$out/lib"
|
expr2='s:/usr/lib/i386-linux-gnu/dri[\0\:]:/run/opengl-driver-32/dri\0\0\0:g'
|
||||||
'' + optionalString (!libsOnly) ''
|
'') + ''
|
||||||
for lib in drivers/modesetting_drv.so libglamoregl.so; do
|
perl -pi -e "$expr1" \
|
||||||
patchelf --add-needed $out/lib/libhack-xreallocarray.so $out/lib/xorg/modules/$lib
|
$out/opt/amdgpu/lib/libEGL.so.1.0.0 \
|
||||||
done
|
$out/opt/amdgpu/lib/libgbm.so.1.0.0 \
|
||||||
|
$out/opt/amdgpu/lib/libGL.so.1.2.0
|
||||||
|
|
||||||
|
perl -pi -e "$expr2" \
|
||||||
|
$out/opt/amdgpu-pro/lib/libEGL.so.1 \
|
||||||
|
$out/opt/amdgpu-pro/lib/libGL.so.1.2 \
|
||||||
|
$out/opt/amdgpu-pro/lib/libGLX_amd.so.0
|
||||||
|
|
||||||
|
find $out -type f -exec perl -pi -e 's:/opt/amdgpu-pro/:/run/amdgpu-pro/:g' {} \;
|
||||||
|
find $out -type f -exec perl -pi -e 's:/opt/amdgpu/:/run/amdgpu/:g' {} \;
|
||||||
|
|
||||||
|
substituteInPlace $vulkan/share/vulkan/icd.d/*.json --replace /opt/amdgpu-pro/lib/${libArch} "$out/opt/amdgpu-pro/lib"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# doing this in post because shrinking breaks things that dynamically load
|
||||||
|
postFixup = ''
|
||||||
|
libPath="$out/opt/amdgpu/lib:$out/opt/amdgpu-pro/lib:$depLibPath"
|
||||||
|
find "$out" -name '*.so*' -type f -exec patchelf --set-rpath "$libPath" {} \;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -177,7 +216,5 @@ in stdenv.mkDerivation rec {
|
|||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ corngood ];
|
maintainers = with maintainers; [ corngood ];
|
||||||
# Copied from the nvidia default.nix to prevent a store collision.
|
|
||||||
priority = 4;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
From 9167d76c435a7c1df7954f0fbe5cc6d083f8ed2f Mon Sep 17 00:00:00 2001
|
|
||||||
From: David McFarland <corngood@gmail.com>
|
|
||||||
Date: Mon, 6 Feb 2017 22:13:49 -0400
|
|
||||||
Subject: [PATCH 1/3] fix warnings for Werror
|
|
||||||
|
|
||||||
---
|
|
||||||
amd/amdgpu/amdgpu_device.c | 4 ++--
|
|
||||||
amd/amdgpu/amdgpu_sa.c | 2 +-
|
|
||||||
amd/display/dc/bios/bios_parser2.c | 8 ++++----
|
|
||||||
3 files changed, 7 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/amd/amdgpu/amdgpu_device.c b/amd/amdgpu/amdgpu_device.c
|
|
||||||
index fc1c543..186e06d 100644
|
|
||||||
--- a/amd/amdgpu/amdgpu_device.c
|
|
||||||
+++ b/amd/amdgpu/amdgpu_device.c
|
|
||||||
@@ -3164,7 +3164,7 @@ void amdgpu_debugfs_cleanup(struct drm_minor *minor)
|
|
||||||
struct drm_info_node *node, *tmp;
|
|
||||||
|
|
||||||
if (!&minor->debugfs_root)
|
|
||||||
- return 0;
|
|
||||||
+ return;
|
|
||||||
|
|
||||||
mutex_lock(&minor->debugfs_lock);
|
|
||||||
list_for_each_entry_safe(node, tmp,
|
|
||||||
@@ -3175,7 +3175,7 @@ void amdgpu_debugfs_cleanup(struct drm_minor *minor)
|
|
||||||
}
|
|
||||||
mutex_unlock(&minor->debugfs_lock);
|
|
||||||
|
|
||||||
- return 0;
|
|
||||||
+ return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
diff --git a/amd/amdgpu/amdgpu_sa.c b/amd/amdgpu/amdgpu_sa.c
|
|
||||||
index 7206b34..8b7123c 100644
|
|
||||||
--- a/amd/amdgpu/amdgpu_sa.c
|
|
||||||
+++ b/amd/amdgpu/amdgpu_sa.c
|
|
||||||
@@ -430,7 +430,7 @@ void amdgpu_sa_bo_dump_debug_info(struct amdgpu_sa_manager *sa_manager,
|
|
||||||
if (i->fence)
|
|
||||||
#if defined(BUILD_AS_DKMS)
|
|
||||||
seq_printf(m, " protected by 0x%08x on context %d",
|
|
||||||
- i->fence->seqno, i->fence->context);
|
|
||||||
+ i->fence->seqno, (int)i->fence->context);
|
|
||||||
#else
|
|
||||||
seq_printf(m, " protected by 0x%08x on context %llu",
|
|
||||||
i->fence->seqno, i->fence->context);
|
|
||||||
diff --git a/amd/display/dc/bios/bios_parser2.c b/amd/display/dc/bios/bios_parser2.c
|
|
||||||
index 86fce5a..99681c5 100644
|
|
||||||
--- a/amd/display/dc/bios/bios_parser2.c
|
|
||||||
+++ b/amd/display/dc/bios/bios_parser2.c
|
|
||||||
@@ -1326,13 +1326,13 @@ static enum bp_result get_embedded_panel_info_v2_1(
|
|
||||||
info->lcd_timing.misc_info.VERTICAL_CUT_OFF = 0;
|
|
||||||
|
|
||||||
info->lcd_timing.misc_info.H_REPLICATION_BY2 =
|
|
||||||
- lvds->lcd_timing.miscinfo & ATOM_H_REPLICATIONBY2;
|
|
||||||
+ (lvds->lcd_timing.miscinfo & ATOM_H_REPLICATIONBY2) != 0;
|
|
||||||
info->lcd_timing.misc_info.V_REPLICATION_BY2 =
|
|
||||||
- lvds->lcd_timing.miscinfo & ATOM_V_REPLICATIONBY2;
|
|
||||||
+ (lvds->lcd_timing.miscinfo & ATOM_V_REPLICATIONBY2) != 0;
|
|
||||||
info->lcd_timing.misc_info.COMPOSITE_SYNC =
|
|
||||||
- lvds->lcd_timing.miscinfo & ATOM_COMPOSITESYNC;
|
|
||||||
+ (lvds->lcd_timing.miscinfo & ATOM_COMPOSITESYNC) != 0;
|
|
||||||
info->lcd_timing.misc_info.INTERLACE =
|
|
||||||
- lvds->lcd_timing.miscinfo & ATOM_INTERLACE;
|
|
||||||
+ (lvds->lcd_timing.miscinfo & ATOM_INTERLACE) != 0;
|
|
||||||
|
|
||||||
/* not provided by VBIOS*/
|
|
||||||
info->lcd_timing.misc_info.DOUBLE_CLOCK = 0;
|
|
||||||
--
|
|
||||||
2.15.1
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From a07ee5dec35ca24a013a6638543ef5030b2bab40 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David McFarland <corngood@gmail.com>
|
|
||||||
Date: Tue, 9 Jan 2018 21:45:33 -0400
|
|
||||||
Subject: [PATCH 2/3] fix sketchy int->ptr warning
|
|
||||||
|
|
||||||
---
|
|
||||||
amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
|
|
||||||
index d0f091b..707815a 100644
|
|
||||||
--- a/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
|
|
||||||
+++ b/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
|
|
||||||
@@ -236,7 +236,7 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
|
|
||||||
pbn = drm_dp_calc_pbn_mode(clock, bpp);
|
|
||||||
|
|
||||||
slots = drm_dp_find_vcpi_slots(mst_mgr, pbn);
|
|
||||||
- ret = drm_dp_mst_allocate_vcpi(mst_mgr, mst_port, pbn, slots);
|
|
||||||
+ ret = drm_dp_mst_allocate_vcpi(mst_mgr, mst_port, pbn, &slots);
|
|
||||||
|
|
||||||
if (!ret)
|
|
||||||
return false;
|
|
||||||
--
|
|
||||||
2.15.1
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 7a3062acbbabdb29239bbc8c984e62589a88576e Mon Sep 17 00:00:00 2001
|
|
||||||
From: David McFarland <corngood@gmail.com>
|
|
||||||
Date: Tue, 9 Jan 2018 21:49:55 -0400
|
|
||||||
Subject: [PATCH 3/3] disable firmware copy
|
|
||||||
|
|
||||||
---
|
|
||||||
pre-build.sh | 5 -----
|
|
||||||
1 file changed, 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pre-build.sh b/pre-build.sh
|
|
||||||
index e7b8a32..bad8f25 100755
|
|
||||||
--- a/pre-build.sh
|
|
||||||
+++ b/pre-build.sh
|
|
||||||
@@ -38,8 +38,3 @@ find ttm -name '*.c' -exec grep EXPORT_SYMBOL {} + \
|
|
||||||
| sort -u \
|
|
||||||
| awk -F'[()]' '{print "#define "$2" amd"$2" //"$0}'\
|
|
||||||
>> include/rename_symbol.h
|
|
||||||
-
|
|
||||||
-FW_DIR="/lib/firmware/$KERNELVER"
|
|
||||||
-mkdir -p $FW_DIR
|
|
||||||
-cp -ar /usr/src/amdgpu-17.40-492261/firmware/radeon $FW_DIR
|
|
||||||
-cp -ar /usr/src/amdgpu-17.40-492261/firmware/amdgpu $FW_DIR
|
|
||||||
--
|
|
||||||
2.15.1
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
#include <malloc.h>
|
|
||||||
|
|
||||||
void *xreallocarray(void *ptr, size_t nmemb, size_t size) {
|
|
||||||
return reallocarray(ptr, nmemb, size);
|
|
||||||
}
|
|
@ -248,7 +248,15 @@ in {
|
|||||||
|
|
||||||
akvcam = callPackage ../os-specific/linux/akvcam { };
|
akvcam = callPackage ../os-specific/linux/akvcam { };
|
||||||
|
|
||||||
amdgpu-pro = callPackage ../os-specific/linux/amdgpu-pro { };
|
amdgpu-pro = callPackage ../os-specific/linux/amdgpu-pro {
|
||||||
|
libffi = pkgs.libffi.overrideAttrs (orig: rec {
|
||||||
|
version = "3.3";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/libffi/libffi/releases/download/v${version}/${orig.pname}-${version}.tar.gz";
|
||||||
|
sha256 = "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
anbox = callPackage ../os-specific/linux/anbox/kmod.nix { };
|
anbox = callPackage ../os-specific/linux/anbox/kmod.nix { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user