tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
amdgpu-pro: 17.10 -> 17.40
David McFarland
8 years ago
68dda232
6d3ff29d
+171
-164
10 changed files
expand all
collapse all
unified
split
nixos
modules
hardware
video
amdgpu-pro.nix
pkgs
os-specific
linux
amdgpu-pro
default.nix
patches
0001-disable-firmware-copy.patch
0001-fix-warnings-for-Werror.patch
0002-fix-sketchy-int-ptr-warning.patch
0002-linux-4.9-fixes.patch
0003-Change-seq_printf-format-for-64-bit-context.patch
0003-disable-firmware-copy.patch
0004-fix-warnings-for-Werror.patch
xreallocarray.c
+15
-1
nixos/modules/hardware/video/amdgpu-pro.nix
···
15
16
opengl = config.hardware.opengl;
17
0
0
0
0
0
0
18
in
19
20
{
21
22
config = mkIf enabled {
23
24
-
nixpkgs.config.xorg.abiCompat = "1.18";
25
26
services.xserver.drivers = singleton
27
{ name = "amdgpu"; modules = [ package ]; libPath = [ package ]; };
···
31
32
boot.extraModulePackages = [ package ];
33
0
0
0
34
boot.blacklistedKernelModules = [ "radeon" ];
35
36
hardware.firmware = [ package ];
···
38
system.activationScripts.setup-amdgpu-pro = ''
39
mkdir -p /run/lib
40
ln -sfn ${package}/lib ${package.libCompatDir}
0
41
'' + optionalString opengl.driSupport32Bit ''
42
ln -sfn ${package32}/lib ${package32.libCompatDir}
43
'';
0
0
0
0
44
45
environment.etc = {
46
"amd/amdrc".source = package + "/etc/amd/amdrc";
···
15
16
opengl = config.hardware.opengl;
17
18
+
kernel = pkgs.linux_4_9.override {
19
+
extraConfig = ''
20
+
KALLSYMS_ALL y
21
+
'';
22
+
};
23
+
24
in
25
26
{
27
28
config = mkIf enabled {
29
30
+
nixpkgs.config.xorg.abiCompat = "1.19";
31
32
services.xserver.drivers = singleton
33
{ name = "amdgpu"; modules = [ package ]; libPath = [ package ]; };
···
37
38
boot.extraModulePackages = [ package ];
39
40
+
boot.kernelPackages =
41
+
pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor kernel);
42
+
43
boot.blacklistedKernelModules = [ "radeon" ];
44
45
hardware.firmware = [ package ];
···
47
system.activationScripts.setup-amdgpu-pro = ''
48
mkdir -p /run/lib
49
ln -sfn ${package}/lib ${package.libCompatDir}
50
+
ln -sfn ${package} /run/amdgpu-pro
51
'' + optionalString opengl.driSupport32Bit ''
52
ln -sfn ${package32}/lib ${package32.libCompatDir}
53
'';
54
+
55
+
system.requiredKernelConfig = with config.lib.kernelConfig; [
56
+
(isYes "KALLSYMS_ALL")
57
+
];
58
59
environment.etc = {
60
"amd/amdrc".source = package + "/etc/amd/amdrc";
+30
-17
pkgs/os-specific/linux/amdgpu-pro/default.nix
···
30
31
in stdenv.mkDerivation rec {
32
33
-
version = "17.10";
34
pname = "amdgpu-pro";
35
-
build = "${version}-401251";
36
37
libCompatDir = "/run/lib/${libArch}";
38
···
41
src = fetchurl {
42
url =
43
"https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-${build}.tar.xz";
44
-
sha256 = "004n0df8acjpjz72z3bjxb2a0b7qwln13jlknfn7xxqvhhwwy40a";
45
curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMD-Radeon-GPU-PRO-Linux-Beta-Driver%e2%80%93Release-Notes.aspx";
46
};
47
···
57
sourceRoot=.
58
'';
59
60
-
modulePatches = [
61
-
./patches/0001-disable-firmware-copy.patch
62
-
./patches/0002-linux-4.9-fixes.patch
63
-
./patches/0003-Change-seq_printf-format-for-64-bit-context.patch
64
-
./patches/0004-fix-warnings-for-Werror.patch
65
-
];
66
67
patchPhase = optionalString (!libsOnly) ''
68
-
pushd usr/src/amdgpu-pro-${build}
69
for patch in $modulePatches
70
do
71
echo $patch
···
73
done
74
popd
75
'';
0
0
76
77
preBuild = optionalString (!libsOnly) ''
78
-
pushd usr/src/amdgpu-pro-${build}
79
makeFlags="$makeFlags M=$(pwd)"
80
patchShebangs pre-build.sh
81
./pre-build.sh ${kernel.version}
82
popd
0
0
0
0
83
'';
84
85
modules = [
···
89
];
90
91
postBuild = optionalString (!libsOnly)
92
-
(concatMapStrings (m: "xz usr/src/amdgpu-pro-${build}/${m}\n") modules);
93
94
NIX_CFLAGS_COMPILE = "-Werror";
95
···
110
pushd usr
111
cp -r lib/${libArch}/* $out/lib
112
'' + optionalString (!libsOnly) ''
113
-
cp -r src/amdgpu-pro-${build}/firmware $out/lib/firmware
114
'' + ''
115
cp -r share $out/share
116
popd
117
118
pushd opt/amdgpu-pro
119
-
'' + optionalString (!stdenv.is64bit) ''
120
cp -r bin $out/bin
121
'' + ''
122
cp -r include $out/include
0
123
cp -r lib/${libArch}/* $out/lib
124
'' + optionalString (!libsOnly) ''
125
mv lib/xorg $out/lib/xorg
···
128
129
'' + optionalString (!libsOnly)
130
(concatMapStrings (m:
131
-
"install -Dm444 usr/src/amdgpu-pro-${build}/${m}.xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/${m}.xz\n") modules)
132
+ ''
133
mv $out/etc/vulkan $out/share
134
interpreter="$(cat $NIX_CC/nix-support/dynamic-linker)"
135
libPath="$out/lib:$out/lib/gbm:$depLibPath"
136
-
'' + optionalString (!stdenv.is64bit) ''
137
for prog in clinfo modetest vbltest kms-universal-planes kms-steal-crtc modeprint amdgpu_test kmstest proptest; do
138
patchelf --interpreter "$interpreter" --set-rpath "$libPath" "$out/bin/$prog"
139
done
···
147
for lib in `find "$out/lib/" -name '*.so*' -type f`; do
148
patchelf --set-rpath "$libPath" "$lib"
149
done
150
-
for lib in libEGL.so.1 libGL.so.1.2 ${optionalString (!libsOnly) "xorg/modules/extensions/libglx.so"} dri/amdgpu_dri.so; do
151
perl -pi -e 's:${libReplaceDir}:${libCompatDir}:g' "$out/lib/$lib"
0
0
0
152
done
153
substituteInPlace "$out/share/vulkan/icd.d/amd_icd${bitness}.json" --replace "/opt/amdgpu-pro/lib/${libArch}" "$out/lib"
0
0
0
0
154
'';
155
156
buildInputs = [
···
30
31
in stdenv.mkDerivation rec {
32
33
+
version = "17.40";
34
pname = "amdgpu-pro";
35
+
build = "${version}-492261";
36
37
libCompatDir = "/run/lib/${libArch}";
38
···
41
src = fetchurl {
42
url =
43
"https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-${build}.tar.xz";
44
+
sha256 = "1c073lp9cq1rc2mddky2r0j2dv9dd167qj02visz37vwaxbm2r5h";
45
curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMD-Radeon-GPU-PRO-Linux-Beta-Driver%e2%80%93Release-Notes.aspx";
46
};
47
···
57
sourceRoot=.
58
'';
59
60
+
modulePatches = optionals (!libsOnly) ([
61
+
./patches/0001-fix-warnings-for-Werror.patch
62
+
./patches/0002-fix-sketchy-int-ptr-warning.patch
63
+
./patches/0003-disable-firmware-copy.patch
64
+
]);
0
65
66
patchPhase = optionalString (!libsOnly) ''
67
+
pushd usr/src/amdgpu-${build}
68
for patch in $modulePatches
69
do
70
echo $patch
···
72
done
73
popd
74
'';
75
+
76
+
xreallocarray = ./xreallocarray.c;
77
78
preBuild = optionalString (!libsOnly) ''
79
+
pushd usr/src/amdgpu-${build}
80
makeFlags="$makeFlags M=$(pwd)"
81
patchShebangs pre-build.sh
82
./pre-build.sh ${kernel.version}
83
popd
84
+
pushd lib
85
+
$CC -fPIC -shared -o libhack-xreallocarray.so $xreallocarray
86
+
strip libhack-xreallocarray.so
87
+
popd
88
'';
89
90
modules = [
···
94
];
95
96
postBuild = optionalString (!libsOnly)
97
+
(concatMapStrings (m: "xz usr/src/amdgpu-${build}/${m}\n") modules);
98
99
NIX_CFLAGS_COMPILE = "-Werror";
100
···
115
pushd usr
116
cp -r lib/${libArch}/* $out/lib
117
'' + optionalString (!libsOnly) ''
118
+
cp -r src/amdgpu-${build}/firmware $out/lib/firmware
119
'' + ''
120
cp -r share $out/share
121
popd
122
123
pushd opt/amdgpu-pro
124
+
'' + optionalString (!libsOnly && stdenv.is64bit) ''
125
cp -r bin $out/bin
126
'' + ''
127
cp -r include $out/include
128
+
cp -r share/* $out/share
129
cp -r lib/${libArch}/* $out/lib
130
'' + optionalString (!libsOnly) ''
131
mv lib/xorg $out/lib/xorg
···
134
135
'' + optionalString (!libsOnly)
136
(concatMapStrings (m:
137
+
"install -Dm444 usr/src/amdgpu-${build}/${m}.xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/${m}.xz\n") modules)
138
+ ''
139
mv $out/etc/vulkan $out/share
140
interpreter="$(cat $NIX_CC/nix-support/dynamic-linker)"
141
libPath="$out/lib:$out/lib/gbm:$depLibPath"
142
+
'' + optionalString (!libsOnly && stdenv.is64bit) ''
143
for prog in clinfo modetest vbltest kms-universal-planes kms-steal-crtc modeprint amdgpu_test kmstest proptest; do
144
patchelf --interpreter "$interpreter" --set-rpath "$libPath" "$out/bin/$prog"
145
done
···
153
for lib in `find "$out/lib/" -name '*.so*' -type f`; do
154
patchelf --set-rpath "$libPath" "$lib"
155
done
156
+
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
157
perl -pi -e 's:${libReplaceDir}:${libCompatDir}:g' "$out/lib/$lib"
158
+
done
159
+
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
160
+
perl -pi -e 's:/opt/amdgpu-pro/:/run/amdgpu-pro/:g' "$out/lib/$lib"
161
done
162
substituteInPlace "$out/share/vulkan/icd.d/amd_icd${bitness}.json" --replace "/opt/amdgpu-pro/lib/${libArch}" "$out/lib"
163
+
'' + optionalString (!libsOnly) ''
164
+
for lib in drivers/modesetting_drv.so libglamoregl.so; do
165
+
patchelf --add-needed $out/lib/libhack-xreallocarray.so $out/lib/xorg/modules/$lib
166
+
done
167
'';
168
169
buildInputs = [
-25
pkgs/os-specific/linux/amdgpu-pro/patches/0001-disable-firmware-copy.patch
···
1
-
From 704cef8638ffbdd8de9e57f28b43ea42c685ea87 Mon Sep 17 00:00:00 2001
2
-
From: David McFarland <corngood@gmail.com>
3
-
Date: Sat, 28 Jan 2017 16:57:26 -0400
4
-
Subject: [PATCH 1/4] 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 622ff13..e3cd009 100755
12
-
--- a/pre-build.sh
13
-
+++ b/pre-build.sh
14
-
@@ -35,8 +35,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-pro-17.10-401251/firmware/radeon $FW_DIR
22
-
-cp -ar /usr/src/amdgpu-pro-17.10-401251/firmware/amdgpu $FW_DIR
23
-
--
24
-
2.12.2
25
-
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
+71
pkgs/os-specific/linux/amdgpu-pro/patches/0001-fix-warnings-for-Werror.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
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
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
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
+
-50
pkgs/os-specific/linux/amdgpu-pro/patches/0002-linux-4.9-fixes.patch
···
1
-
From 0ead7017e1db18be971c24c891d4bdcc507deea7 Mon Sep 17 00:00:00 2001
2
-
From: David McFarland <corngood@gmail.com>
3
-
Date: Sun, 29 Jan 2017 18:23:47 -0400
4
-
Subject: [PATCH 2/4] linux-4.9 fixes
5
-
6
-
---
7
-
amd/amdkcl/kcl_io.c | 2 ++
8
-
amd/display/amdgpu_dm/amdgpu_dm_types.c | 8 ++++++++
9
-
2 files changed, 10 insertions(+)
10
-
11
-
diff --git a/amd/amdkcl/kcl_io.c b/amd/amdkcl/kcl_io.c
12
-
index d8f843f..9a1bd9b 100644
13
-
--- a/amd/amdkcl/kcl_io.c
14
-
+++ b/amd/amdkcl/kcl_io.c
15
-
@@ -31,4 +31,6 @@ void amdkcl_io_init(void)
16
-
_kcl_io_free_memtype = amdkcl_fp_setup("io_free_memtype", NULL);
17
-
}
18
-
#endif
19
-
+#else
20
-
+void amdkcl_io_init(void) {}
21
-
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) */
22
-
diff --git a/amd/display/amdgpu_dm/amdgpu_dm_types.c b/amd/display/amdgpu_dm/amdgpu_dm_types.c
23
-
index 34313a9..44a4a71 100644
24
-
--- a/amd/display/amdgpu_dm/amdgpu_dm_types.c
25
-
+++ b/amd/display/amdgpu_dm/amdgpu_dm_types.c
26
-
@@ -1720,6 +1720,10 @@ static int dm_plane_helper_prepare_fb(
27
-
static int dm_plane_helper_prepare_fb(
28
-
struct drm_plane *plane,
29
-
const struct drm_plane_state *new_state)
30
-
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
31
-
+static int dm_plane_helper_prepare_fb(
32
-
+ struct drm_plane *plane,
33
-
+ struct drm_plane_state *new_state)
34
-
#else
35
-
static int dm_plane_helper_prepare_fb(
36
-
struct drm_plane *plane,
37
-
@@ -1766,6 +1770,10 @@ static void dm_plane_helper_cleanup_fb(
38
-
static void dm_plane_helper_cleanup_fb(
39
-
struct drm_plane *plane,
40
-
const struct drm_plane_state *old_state)
41
-
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
42
-
+static void dm_plane_helper_cleanup_fb(
43
-
+ struct drm_plane *plane,
44
-
+ struct drm_plane_state *old_state)
45
-
#else
46
-
static void dm_plane_helper_cleanup_fb(
47
-
struct drm_plane *plane,
48
-
--
49
-
2.12.2
50
-
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-25
pkgs/os-specific/linux/amdgpu-pro/patches/0003-Change-seq_printf-format-for-64-bit-context.patch
···
1
-
From b6dd36dd90c5d88ae10b9dbc763d3bacb95ccddb Mon Sep 17 00:00:00 2001
2
-
From: "Luke A. Guest" <laguest@archeia.com>
3
-
Date: Sun, 25 Sep 2016 16:46:39 +0100
4
-
Subject: [PATCH 3/4] Change seq_printf format for 64 bit context
5
-
6
-
---
7
-
amd/amdgpu/amdgpu_sa.c | 2 +-
8
-
1 file changed, 1 insertion(+), 1 deletion(-)
9
-
10
-
diff --git a/amd/amdgpu/amdgpu_sa.c b/amd/amdgpu/amdgpu_sa.c
11
-
index 74932bf..db4119a 100644
12
-
--- a/amd/amdgpu/amdgpu_sa.c
13
-
+++ b/amd/amdgpu/amdgpu_sa.c
14
-
@@ -428,7 +428,7 @@ void amdgpu_sa_bo_dump_debug_info(struct amdgpu_sa_manager *sa_manager,
15
-
soffset, eoffset, eoffset - soffset);
16
-
17
-
if (i->fence)
18
-
-#if defined(BUILD_AS_DKMS)
19
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
20
-
seq_printf(m, " protected by 0x%08x on context %d",
21
-
i->fence->seqno, i->fence->context);
22
-
#else
23
-
--
24
-
2.12.2
25
-
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
+25
pkgs/os-specific/linux/amdgpu-pro/patches/0003-disable-firmware-copy.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
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
+
-46
pkgs/os-specific/linux/amdgpu-pro/patches/0004-fix-warnings-for-Werror.patch
···
1
-
From dbf01d3934c52acaaa37f008859f69c5edf19ad5 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 4/4] fix warnings for Werror
5
-
6
-
---
7
-
amd/amdgpu/amdgpu_ttm.c | 2 ++
8
-
amd/display/amdgpu_dm/amdgpu_dm_types.c | 2 +-
9
-
2 files changed, 3 insertions(+), 1 deletion(-)
10
-
11
-
diff --git a/amd/amdgpu/amdgpu_ttm.c b/amd/amdgpu/amdgpu_ttm.c
12
-
index 0e30389..890aafa 100644
13
-
--- a/amd/amdgpu/amdgpu_ttm.c
14
-
+++ b/amd/amdgpu/amdgpu_ttm.c
15
-
@@ -1083,6 +1083,7 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm,
16
-
return flags;
17
-
}
18
-
19
-
+#if 0
20
-
static void amdgpu_ttm_lru_removal(struct ttm_buffer_object *tbo)
21
-
{
22
-
struct amdgpu_device *adev = amdgpu_ttm_adev(tbo->bdev);
23
-
@@ -1132,6 +1133,7 @@ static struct list_head *amdgpu_ttm_swap_lru_tail(struct ttm_buffer_object *tbo)
24
-
25
-
return res;
26
-
}
27
-
+#endif
28
-
29
-
static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
30
-
const struct ttm_place *place)
31
-
diff --git a/amd/display/amdgpu_dm/amdgpu_dm_types.c b/amd/display/amdgpu_dm/amdgpu_dm_types.c
32
-
index 44a4a71..ae7e707 100644
33
-
--- a/amd/display/amdgpu_dm/amdgpu_dm_types.c
34
-
+++ b/amd/display/amdgpu_dm/amdgpu_dm_types.c
35
-
@@ -932,7 +932,7 @@ static void decide_crtc_timing_for_drm_display_mode(
36
-
}
37
-
38
-
static struct dc_target *create_target_for_sink(
39
-
- const struct amdgpu_connector *aconnector,
40
-
+ struct amdgpu_connector *aconnector,
41
-
const struct drm_display_mode *drm_mode,
42
-
const struct dm_connector_state *dm_state)
43
-
{
44
-
--
45
-
2.12.2
46
-
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
+5
pkgs/os-specific/linux/amdgpu-pro/xreallocarray.c
···
0
0
0
0
0
···
1
+
#include <malloc.h>
2
+
3
+
void *xreallocarray(void *ptr, size_t nmemb, size_t size) {
4
+
return reallocarray(ptr, nmemb, size);
5
+
}