Skip to content

Commit

Permalink
amdgpu-pro: 16.40 -> 16.50 (#21502)
Browse files Browse the repository at this point in the history
  • Loading branch information
corngood authored and vcunat committed Jan 10, 2017
1 parent 11696e2 commit b2da3d3
Show file tree
Hide file tree
Showing 18 changed files with 313 additions and 426 deletions.
33 changes: 15 additions & 18 deletions pkgs/os-specific/linux/amdgpu-pro/default.nix
Expand Up @@ -30,9 +30,9 @@ let

in stdenv.mkDerivation rec {

version = "16.40";
version = "16.50";
pname = "amdgpu-pro";
build = "16.40-348864";
build = "${version}-362463";

libCompatDir = "/run/lib/${libArch}";

Expand All @@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url =
"https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-${build}.tar.xz";
sha256 = "1c06lx07irmlpmbmgb3qcgpzj6q6rimszrbbdrgz8kqnfpcv3mjr";
sha256 = "1wl8mabk9g7s43bdarzl2i5crp8rl1advnb5mw3p3821sqzh2nd9";
curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMD-Radeon-GPU-PRO-Linux-Beta-Driver%e2%80%93Release-Notes.aspx";
};

Expand All @@ -58,20 +58,18 @@ in stdenv.mkDerivation rec {
'';

modulePatches = [
./patches/0001-Find-correct-System.map.patch
./patches/0002-Fix-kernel-module-install-location.patch
./patches/0003-Add-Gentoo-as-build-option.patch
./patches/0004-Remove-extra-parameter-from-ttm_bo_reserve-for-4.7.0.patch
./patches/0005-Remove-first-param-from-drm_gem_object_lookup.patch
./patches/0006-Remove-vblank_disable_allowed-assignment.patch
./patches/0007-Fix-__drm_atomic_helper_connector_destroy_state-call.patch
./patches/0008-Change-seq_printf-format-for-64-bit-context.patch
./patches/0009-Fix-vblank-calls.patch
./patches/0010-Fix-crtc_gamma-functions-for-4.8.0.patch
./patches/0011-Fix-drm_atomic_helper_swap_state-for-4.8.0.patch
./patches/0012-Add-extra-flag-to-ttm_bo_move_ttm-for-4.8.0-rc2.patch
./patches/0013-Remove-dependency-on-System.map.patch
./patches/0014-disable-dal-by-default.patch
./patches/0001-Fix-kernel-module-install-location.patch
./patches/0002-Add-Gentoo-as-build-option.patch
./patches/0003-Remove-extra-parameter-from-ttm_bo_reserve-for-4.7.0.patch
./patches/0004-Change-seq_printf-format-for-64-bit-context.patch
./patches/0005-Fix-vblank-calls.patch
./patches/0006-Fix-crtc_gamma-functions-for-4.8.0.patch
./patches/0007-Fix-drm_atomic_helper_swap_state-for-4.8.0.patch
./patches/0008-Add-extra-flag-to-ttm_bo_move_ttm-for-4.8.0-rc2.patch
./patches/0009-Remove-dependency-on-System.map.patch
./patches/0010-disable-dal-by-default.patch
./patches/0011-kcl-fixes-for-16.50-linux-4.8.patch
./patches/0012-use-kernel-fence_array-in-4.8.patch
];

patchPhase = optionalString (!libsOnly) ''
Expand Down Expand Up @@ -137,7 +135,6 @@ in stdenv.mkDerivation rec {
patchelf --interpreter "$interpreter" --set-rpath "$libPath" "$out/bin/$prog"
done
'' + ''
ln -s libgbm.so.1.0.0 $out/lib/libgbm.so.1
ln -s ${makeLibraryPath [ncurses5]}/libncursesw.so.5 $out/lib/libtinfo.so.5
'';

Expand Down

This file was deleted.

@@ -1,25 +1,25 @@
From c1860b4e8c2ebb784a07d6ba067c510950e67d24 Mon Sep 17 00:00:00 2001
From e787277fd4f43399de2da355b08e478c2a58d589 Mon Sep 17 00:00:00 2001
From: "Luke A. Guest" <laguest@archeia.com>
Date: Sun, 25 Sep 2016 15:31:13 +0100
Subject: [PATCH 02/14] Fix kernel module install location
Subject: [PATCH 01/11] Fix kernel module install location

---
dkms.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dkms.conf b/dkms.conf
index d1a5e1d..0e03f08 100644
index 7f11158..2f080e2 100644
--- a/dkms.conf
+++ b/dkms.conf
@@ -2,7 +2,7 @@ PACKAGE_NAME="amdgpu-pro"
PACKAGE_VERSION="16.40-348864"
PACKAGE_VERSION="16.50-362463"
BUILT_MODULE_NAME[0]="amdgpu"
BUILT_MODULE_LOCATION[0]="amd/amdgpu"
-DEST_MODULE_LOCATION[0]="/extra"
-DEST_MODULE_LOCATION[0]="/updates"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/gpu/drm/amd/amdgpu"
AUTOINSTALL="yes"
PRE_BUILD="pre-build.sh $kernelver"
REMAKE_INITRD="yes"

--
2.10.1
2.11.0

@@ -1,20 +1,20 @@
From c26c7670869e02c39c0d0f6dee9094a621f42252 Mon Sep 17 00:00:00 2001
From da51551f671be3282b6f69ef76e495b169a5dc3f Mon Sep 17 00:00:00 2001
From: "Luke A. Guest" <laguest@archeia.com>
Date: Sun, 25 Sep 2016 15:31:49 +0100
Subject: [PATCH 03/14] Add Gentoo as build option
Subject: [PATCH 02/11] Add Gentoo as build option

---
amd/backport/Makefile | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/amd/backport/Makefile b/amd/backport/Makefile
index 0c285ef..dcc94d5 100644
index a6ab7fe..ff9339d 100644
--- a/amd/backport/Makefile
+++ b/amd/backport/Makefile
@@ -17,8 +17,13 @@ else ifeq ("ubuntu",$(OS_NAME))
ccflags-y += -DOS_NAME_UBUNTU
else ifeq ("steamos",$(OS_NAME))
ccflags-y += -DOS_NAME_STEAMOS
@@ -22,8 +22,13 @@ else ifeq ("sled",$(OS_NAME))
ccflags-y += -DOS_NAME_SLE
else ifeq ("sles",$(OS_NAME))
ccflags-y += -DOS_NAME_SLE
+else ifeq ("gentoo",$(OS_NAME))
+ccflags-y += -DOS_NAME_GENTOO
+# We don't have a version inside /etc/os-release.
Expand All @@ -26,5 +26,5 @@ index 0c285ef..dcc94d5 100644

ccflags-y += \
--
2.10.1
2.11.0

@@ -1,17 +1,17 @@
From d21e811c6f26674a0e1c2398dce6d247a1dd4918 Mon Sep 17 00:00:00 2001
From 999a30883f34c4603c3b747a58a89d4924583769 Mon Sep 17 00:00:00 2001
From: "Luke A. Guest" <laguest@archeia.com>
Date: Sun, 25 Sep 2016 15:46:58 +0100
Subject: [PATCH 04/14] Remove extra parameter from ttm_bo_reserve for 4.7.0
Subject: [PATCH 03/11] Remove extra parameter from ttm_bo_reserve for 4.7.0

---
amd/backport/include/kcl/kcl_ttm.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/amd/backport/include/kcl/kcl_ttm.h b/amd/backport/include/kcl/kcl_ttm.h
index 05c444b..c5a602c 100644
index 6e5a170..52cdbc8 100644
--- a/amd/backport/include/kcl/kcl_ttm.h
+++ b/amd/backport/include/kcl/kcl_ttm.h
@@ -106,7 +106,11 @@ static inline int kcl_ttm_bo_reserve(struct ttm_buffer_object *bo,
@@ -113,7 +113,11 @@ static inline int kcl_ttm_bo_reserve(struct ttm_buffer_object *bo,
struct ww_acquire_ctx *ticket)
{
#if defined(BUILD_AS_DKMS)
Expand All @@ -24,5 +24,5 @@ index 05c444b..c5a602c 100644
return ttm_bo_reserve(bo, interruptible, no_wait, ticket);
#endif
--
2.10.1
2.11.0

@@ -0,0 +1,25 @@
From 084b2915e6876d8fdb913938569c0ce7ffef65bc Mon Sep 17 00:00:00 2001
From: "Luke A. Guest" <laguest@archeia.com>
Date: Sun, 25 Sep 2016 16:46:39 +0100
Subject: [PATCH 04/11] Change seq_printf format for 64 bit context

---
amd/amdgpu/amdgpu_sa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/amd/amdgpu/amdgpu_sa.c b/amd/amdgpu/amdgpu_sa.c
index 052f745..5886b9a 100644
--- a/amd/amdgpu/amdgpu_sa.c
+++ b/amd/amdgpu/amdgpu_sa.c
@@ -428,7 +428,7 @@ void amdgpu_sa_bo_dump_debug_info(struct amdgpu_sa_manager *sa_manager,
soffset, eoffset, eoffset - soffset);

if (i->fence)
-#if defined(BUILD_AS_DKMS)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
seq_printf(m, " protected by 0x%08x on context %d",
i->fence->seqno, i->fence->context);
#else
--
2.11.0

@@ -1,18 +1,19 @@
From 9da98ec93816277a2d4e93d3205da044bace08bc Mon Sep 17 00:00:00 2001
From 1884ef3a813f3dac0029c7539654ba978635d5d3 Mon Sep 17 00:00:00 2001
From: "Luke A. Guest" <laguest@archeia.com>
Date: Sun, 25 Sep 2016 16:49:09 +0100
Subject: [PATCH 09/14] Fix vblank calls
Subject: [PATCH 05/11] Fix vblank calls

---
amd/amdgpu/amdgpu_display.c | 8 ++++++++
amd/amdgpu/dce_v10_0.c | 8 ++++++++
amd/amdgpu/dce_v11_0.c | 8 ++++++++
amd/amdgpu/dce_v8_0.c | 8 ++++++++
amd/amdgpu/dce_v10_0.c | 4 ++++
amd/amdgpu/dce_v11_0.c | 4 ++++
amd/amdgpu/dce_v8_0.c | 4 ++++
amd/amdgpu/dce_virtual.c | 8 ++++++++
amd/dal/amdgpu_dm/amdgpu_dm.c | 4 ++++
5 files changed, 36 insertions(+)
6 files changed, 32 insertions(+)

diff --git a/amd/amdgpu/amdgpu_display.c b/amd/amdgpu/amdgpu_display.c
index 862611c..267c65f 100644
index 8425b1d..d6cd383 100644
--- a/amd/amdgpu/amdgpu_display.c
+++ b/amd/amdgpu/amdgpu_display.c
@@ -268,7 +268,11 @@ int amdgpu_crtc_page_flip(struct drm_crtc *crtc,
Expand All @@ -38,20 +39,12 @@ index 862611c..267c65f 100644
+#endif

pflip_cleanup:
if (unlikely(amdgpu_bo_reserve(new_rbo, false) != 0)) {
if (unlikely(amdgpu_bo_reserve(new_abo, false) != 0)) {
diff --git a/amd/amdgpu/dce_v10_0.c b/amd/amdgpu/dce_v10_0.c
index 0fd1e4f..5f0044c 100644
index 650d193..b1880ac 100644
--- a/amd/amdgpu/dce_v10_0.c
+++ b/amd/amdgpu/dce_v10_0.c
@@ -3372,11 +3372,19 @@ static int dce_v10_0_pageflip_irq(struct amdgpu_device *adev,

/* wakeup usersapce */
if (works->event)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+ drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
+#else
drm_send_vblank_event(adev->ddev, crtc_id, works->event);
+#endif
@@ -3342,7 +3342,11 @@ static int dce_v10_0_pageflip_irq(struct amdgpu_device *adev,

spin_unlock_irqrestore(&adev->ddev->event_lock, flags);

Expand All @@ -64,18 +57,26 @@ index 0fd1e4f..5f0044c 100644

return 0;
diff --git a/amd/amdgpu/dce_v11_0.c b/amd/amdgpu/dce_v11_0.c
index a85eb5f..8edc670 100644
index ca03d8e..b654b64 100644
--- a/amd/amdgpu/dce_v11_0.c
+++ b/amd/amdgpu/dce_v11_0.c
@@ -3432,11 +3432,19 @@ static int dce_v11_0_pageflip_irq(struct amdgpu_device *adev,
@@ -3391,7 +3391,11 @@ static int dce_v11_0_pageflip_irq(struct amdgpu_device *adev,

spin_unlock_irqrestore(&adev->ddev->event_lock, flags);

/* wakeup usersapce */
if(works->event)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+ drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
+ drm_crtc_vblank_put(&amdgpu_crtc->base);
+#else
drm_send_vblank_event(adev->ddev, crtc_id, works->event);
drm_vblank_put(adev->ddev, amdgpu_crtc->crtc_id);
+#endif
schedule_work(&works->unpin_work);

return 0;
diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
index 8e4dff7..b598caa 100644
--- a/amd/amdgpu/dce_v8_0.c
+++ b/amd/amdgpu/dce_v8_0.c
@@ -3252,7 +3252,11 @@ static int dce_v8_0_pageflip_irq(struct amdgpu_device *adev,

spin_unlock_irqrestore(&adev->ddev->event_lock, flags);

Expand All @@ -87,16 +88,16 @@ index a85eb5f..8edc670 100644
schedule_work(&works->unpin_work);

return 0;
diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
index 308f5e4..57e8014 100644
--- a/amd/amdgpu/dce_v8_0.c
+++ b/amd/amdgpu/dce_v8_0.c
@@ -3323,11 +3323,19 @@ static int dce_v8_0_pageflip_irq(struct amdgpu_device *adev,
diff --git a/amd/amdgpu/dce_virtual.c b/amd/amdgpu/dce_virtual.c
index 0c6e873..36e2094 100644
--- a/amd/amdgpu/dce_virtual.c
+++ b/amd/amdgpu/dce_virtual.c
@@ -746,11 +746,19 @@ static int dce_virtual_pageflip_irq(struct amdgpu_device *adev,

/* wakeup usersapce */
if (works->event)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+ drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
+ drm_crtc_send_vblank_event(&amdgpu_crtc->base, works->event);
+#else
drm_send_vblank_event(adev->ddev, crtc_id, works->event);
+#endif
Expand All @@ -112,10 +113,10 @@ index 308f5e4..57e8014 100644

return 0;
diff --git a/amd/dal/amdgpu_dm/amdgpu_dm.c b/amd/dal/amdgpu_dm/amdgpu_dm.c
index 30865ec..f49999b 100644
index c5fcf5a..e9892d8 100644
--- a/amd/dal/amdgpu_dm/amdgpu_dm.c
+++ b/amd/dal/amdgpu_dm/amdgpu_dm.c
@@ -196,10 +196,14 @@ static void dm_pflip_high_irq(void *interrupt_params)
@@ -213,10 +213,14 @@ static void dm_pflip_high_irq(void *interrupt_params)

/* wakeup usersapce */
if(works->event)
Expand All @@ -131,5 +132,5 @@ index 30865ec..f49999b 100644
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);

--
2.10.1
2.11.0

0 comments on commit b2da3d3

Please sign in to comment.