mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
amdgpu-pro: 16.40 -> 16.50 (#21502)
This commit is contained in:
parent
11696e290d
commit
b2da3d3050
18 changed files with 314 additions and 427 deletions
|
@ -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}";
|
||||
|
||||
|
@ -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";
|
||||
};
|
||||
|
||||
|
@ -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) ''
|
||||
|
@ -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
|
||||
'';
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
From 4243cf67bcdf8c3865efbfe19dc8841c88ab2daa Mon Sep 17 00:00:00 2001
|
||||
From: "Luke A. Guest" <laguest@archeia.com>
|
||||
Date: Sun, 25 Sep 2016 15:30:26 +0100
|
||||
Subject: [PATCH 01/14] Find correct System.map
|
||||
|
||||
---
|
||||
pre-build.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pre-build.sh b/pre-build.sh
|
||||
index 95457bd..169ccf0 100755
|
||||
--- a/pre-build.sh
|
||||
+++ b/pre-build.sh
|
||||
@@ -27,7 +27,7 @@ source amd/backport/symbols
|
||||
|
||||
echo '// auto generated by DKMS pre-build.sh' > amd/backport/symbols.c
|
||||
for sym in $SYMS; do
|
||||
- addr=$(grep $sym /boot/System.map-$KERNELVER | awk -F' ' '{print $1}')
|
||||
+ addr=$(grep $sym /boot/System.map*-$KERNELVER | awk -F' ' '{print $1}')
|
||||
echo "void *$sym = (void *)0x$addr;" >> amd/backport/symbols.c
|
||||
done
|
||||
|
||||
--
|
||||
2.10.1
|
||||
|
|
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
||||
|
@ -64,18 +57,10 @@ 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,
|
||||
|
||||
/* 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
|
||||
@@ -3391,7 +3391,11 @@ static int dce_v11_0_pageflip_irq(struct amdgpu_device *adev,
|
||||
|
||||
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
|
||||
|
||||
|
@ -88,15 +73,31 @@ index a85eb5f..8edc670 100644
|
|||
|
||||
return 0;
|
||||
diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
|
||||
index 308f5e4..57e8014 100644
|
||||
index 8e4dff7..b598caa 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,
|
||||
@@ -3252,7 +3252,11 @@ static int dce_v8_0_pageflip_irq(struct amdgpu_device *adev,
|
||||
|
||||
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
|
||||
+ drm_crtc_vblank_put(&amdgpu_crtc->base);
|
||||
+#else
|
||||
drm_vblank_put(adev->ddev, amdgpu_crtc->crtc_id);
|
||||
+#endif
|
||||
schedule_work(&works->unpin_work);
|
||||
|
||||
return 0;
|
||||
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
|
||||
|
@ -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)
|
||||
|
@ -131,5 +132,5 @@ index 30865ec..f49999b 100644
|
|||
spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
|
||||
|
||||
--
|
||||
2.10.1
|
||||
2.11.0
|
||||
|
|
@ -1,196 +0,0 @@
|
|||
From 4ac701dce0a4139e89c80237fc4eaa65f48c6f07 Mon Sep 17 00:00:00 2001
|
||||
From: "Luke A. Guest" <laguest@archeia.com>
|
||||
Date: Sun, 25 Sep 2016 15:53:50 +0100
|
||||
Subject: [PATCH 05/14] Remove first param from drm_gem_object_lookup
|
||||
|
||||
---
|
||||
amd/amdgpu/amdgpu_bo_list.c | 4 ++++
|
||||
amd/amdgpu/amdgpu_cs.c | 4 ++++
|
||||
amd/amdgpu/amdgpu_display.c | 4 ++++
|
||||
amd/amdgpu/amdgpu_gem.c | 20 ++++++++++++++++++++
|
||||
amd/amdgpu/dce_v10_0.c | 4 ++++
|
||||
amd/amdgpu/dce_v11_0.c | 4 ++++
|
||||
amd/amdgpu/dce_v8_0.c | 4 ++++
|
||||
amd/dal/amdgpu_dm/amdgpu_dm_types.c | 4 ++++
|
||||
8 files changed, 48 insertions(+)
|
||||
|
||||
diff --git a/amd/amdgpu/amdgpu_bo_list.c b/amd/amdgpu/amdgpu_bo_list.c
|
||||
index 844214d..7ae09cf 100644
|
||||
--- a/amd/amdgpu/amdgpu_bo_list.c
|
||||
+++ b/amd/amdgpu/amdgpu_bo_list.c
|
||||
@@ -107,7 +107,11 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
|
||||
struct amdgpu_bo *bo;
|
||||
struct mm_struct *usermm;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ gobj = drm_gem_object_lookup(filp, info[i].bo_handle);
|
||||
+#else
|
||||
gobj = drm_gem_object_lookup(adev->ddev, filp, info[i].bo_handle);
|
||||
+#endif
|
||||
if (!gobj) {
|
||||
r = -ENOENT;
|
||||
goto error_free;
|
||||
diff --git a/amd/amdgpu/amdgpu_cs.c b/amd/amdgpu/amdgpu_cs.c
|
||||
index 20f6ab2..22363ab 100644
|
||||
--- a/amd/amdgpu/amdgpu_cs.c
|
||||
+++ b/amd/amdgpu/amdgpu_cs.c
|
||||
@@ -92,8 +92,12 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p,
|
||||
{
|
||||
struct drm_gem_object *gobj;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ gobj = drm_gem_object_lookup(p->filp, data->handle);
|
||||
+#else
|
||||
gobj = drm_gem_object_lookup(p->adev->ddev, p->filp,
|
||||
data->handle);
|
||||
+#endif
|
||||
if (gobj == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
diff --git a/amd/amdgpu/amdgpu_display.c b/amd/amdgpu/amdgpu_display.c
|
||||
index 96c4fa5..862611c 100644
|
||||
--- a/amd/amdgpu/amdgpu_display.c
|
||||
+++ b/amd/amdgpu/amdgpu_display.c
|
||||
@@ -601,7 +601,11 @@ amdgpu_user_framebuffer_create(struct drm_device *dev,
|
||||
struct amdgpu_framebuffer *amdgpu_fb;
|
||||
int ret;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);
|
||||
+#else
|
||||
obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
|
||||
+#endif
|
||||
if (obj == NULL) {
|
||||
dev_err(&dev->pdev->dev, "No GEM object associated to handle 0x%08X, "
|
||||
"can't create framebuffer\n", mode_cmd->handles[0]);
|
||||
diff --git a/amd/amdgpu/amdgpu_gem.c b/amd/amdgpu/amdgpu_gem.c
|
||||
index 0069aec..6da025b 100644
|
||||
--- a/amd/amdgpu/amdgpu_gem.c
|
||||
+++ b/amd/amdgpu/amdgpu_gem.c
|
||||
@@ -397,7 +397,11 @@ int amdgpu_mode_dumb_mmap(struct drm_file *filp,
|
||||
struct drm_gem_object *gobj;
|
||||
struct amdgpu_bo *robj;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ gobj = drm_gem_object_lookup(filp, handle);
|
||||
+#else
|
||||
gobj = drm_gem_object_lookup(dev, filp, handle);
|
||||
+#endif
|
||||
if (gobj == NULL) {
|
||||
return -ENOENT;
|
||||
}
|
||||
@@ -461,7 +465,11 @@ int amdgpu_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
|
||||
int r = 0;
|
||||
long ret;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ gobj = drm_gem_object_lookup(filp, handle);
|
||||
+#else
|
||||
gobj = drm_gem_object_lookup(dev, filp, handle);
|
||||
+#endif
|
||||
if (gobj == NULL) {
|
||||
return -ENOENT;
|
||||
}
|
||||
@@ -495,7 +503,11 @@ int amdgpu_gem_metadata_ioctl(struct drm_device *dev, void *data,
|
||||
int r = -1;
|
||||
|
||||
DRM_DEBUG("%d \n", args->handle);
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ gobj = drm_gem_object_lookup(filp, args->handle);
|
||||
+#else
|
||||
gobj = drm_gem_object_lookup(dev, filp, args->handle);
|
||||
+#endif
|
||||
if (gobj == NULL)
|
||||
return -ENOENT;
|
||||
robj = gem_to_amdgpu_bo(gobj);
|
||||
@@ -643,7 +655,11 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ gobj = drm_gem_object_lookup(filp, args->handle);
|
||||
+#else
|
||||
gobj = drm_gem_object_lookup(dev, filp, args->handle);
|
||||
+#endif
|
||||
if (gobj == NULL)
|
||||
return -ENOENT;
|
||||
rbo = gem_to_amdgpu_bo(gobj);
|
||||
@@ -705,7 +721,11 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
|
||||
struct amdgpu_bo *robj;
|
||||
int r;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ gobj = drm_gem_object_lookup(filp, args->handle);
|
||||
+#else
|
||||
gobj = drm_gem_object_lookup(dev, filp, args->handle);
|
||||
+#endif
|
||||
if (gobj == NULL) {
|
||||
return -ENOENT;
|
||||
}
|
||||
diff --git a/amd/amdgpu/dce_v10_0.c b/amd/amdgpu/dce_v10_0.c
|
||||
index 3fae88d..0fd1e4f 100644
|
||||
--- a/amd/amdgpu/dce_v10_0.c
|
||||
+++ b/amd/amdgpu/dce_v10_0.c
|
||||
@@ -2594,7 +2594,11 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ obj = drm_gem_object_lookup(file_priv, handle);
|
||||
+#else
|
||||
obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
|
||||
+#endif
|
||||
if (!obj) {
|
||||
DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
|
||||
return -ENOENT;
|
||||
diff --git a/amd/amdgpu/dce_v11_0.c b/amd/amdgpu/dce_v11_0.c
|
||||
index fe87795..a85eb5f 100644
|
||||
--- a/amd/amdgpu/dce_v11_0.c
|
||||
+++ b/amd/amdgpu/dce_v11_0.c
|
||||
@@ -2604,7 +2604,11 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ obj = drm_gem_object_lookup(file_priv, handle);
|
||||
+#else
|
||||
obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
|
||||
+#endif
|
||||
if (!obj) {
|
||||
DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
|
||||
return -ENOENT;
|
||||
diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
|
||||
index 1f5959b..308f5e4 100644
|
||||
--- a/amd/amdgpu/dce_v8_0.c
|
||||
+++ b/amd/amdgpu/dce_v8_0.c
|
||||
@@ -2448,7 +2448,11 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ obj = drm_gem_object_lookup(file_priv, handle);
|
||||
+#else
|
||||
obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
|
||||
+#endif
|
||||
if (!obj) {
|
||||
DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
|
||||
return -ENOENT;
|
||||
diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
index d14c96f..a9de2e5 100644
|
||||
--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
+++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
@@ -156,7 +156,11 @@ static int dm_crtc_pin_cursor_bo_new(
|
||||
|
||||
amdgpu_crtc = to_amdgpu_crtc(crtc);
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ obj = drm_gem_object_lookup(file_priv, handle);
|
||||
+#else
|
||||
obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
|
||||
+#endif
|
||||
|
||||
if (!obj) {
|
||||
DRM_ERROR(
|
||||
--
|
||||
2.10.1
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From b41eafa282a003cde9729e2ff486f55dc54f12c6 Mon Sep 17 00:00:00 2001
|
||||
From 12660ae02838f99c0784194908f7a189bc2ab0ae Mon Sep 17 00:00:00 2001
|
||||
From: "Luke A. Guest" <laguest@archeia.com>
|
||||
Date: Sun, 25 Sep 2016 16:56:47 +0100
|
||||
Subject: [PATCH 10/14] Fix crtc_gamma functions for 4.8.0
|
||||
Subject: [PATCH 06/11] Fix crtc_gamma functions for 4.8.0
|
||||
|
||||
---
|
||||
amd/amdgpu/dce_v10_0.c | 19 +++++++++++++++++++
|
||||
|
@ -11,10 +11,10 @@ Subject: [PATCH 10/14] Fix crtc_gamma functions for 4.8.0
|
|||
4 files changed, 69 insertions(+)
|
||||
|
||||
diff --git a/amd/amdgpu/dce_v10_0.c b/amd/amdgpu/dce_v10_0.c
|
||||
index 5f0044c..85378aa 100644
|
||||
index b1880ac..53746fa 100644
|
||||
--- a/amd/amdgpu/dce_v10_0.c
|
||||
+++ b/amd/amdgpu/dce_v10_0.c
|
||||
@@ -2671,6 +2671,24 @@ static void dce_v10_0_cursor_reset(struct drm_crtc *crtc)
|
||||
@@ -2627,6 +2627,24 @@ static void dce_v10_0_cursor_reset(struct drm_crtc *crtc)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ index 5f0044c..85378aa 100644
|
|||
static void dce_v10_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
u16 *blue, uint32_t start, uint32_t size)
|
||||
{
|
||||
@@ -2685,6 +2703,7 @@ static void dce_v10_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green
|
||||
@@ -2641,6 +2659,7 @@ static void dce_v10_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green
|
||||
}
|
||||
dce_v10_0_crtc_load_lut(crtc);
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ index 5f0044c..85378aa 100644
|
|||
static void dce_v10_0_crtc_destroy(struct drm_crtc *crtc)
|
||||
{
|
||||
diff --git a/amd/amdgpu/dce_v11_0.c b/amd/amdgpu/dce_v11_0.c
|
||||
index 8edc670..0129543 100644
|
||||
index b654b64..3edd66d 100644
|
||||
--- a/amd/amdgpu/dce_v11_0.c
|
||||
+++ b/amd/amdgpu/dce_v11_0.c
|
||||
@@ -2681,6 +2681,24 @@ static void dce_v11_0_cursor_reset(struct drm_crtc *crtc)
|
||||
@@ -2643,6 +2643,24 @@ static void dce_v11_0_cursor_reset(struct drm_crtc *crtc)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ index 8edc670..0129543 100644
|
|||
static void dce_v11_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
u16 *blue, uint32_t start, uint32_t size)
|
||||
{
|
||||
@@ -2695,6 +2713,7 @@ static void dce_v11_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green
|
||||
@@ -2657,6 +2675,7 @@ static void dce_v11_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green
|
||||
}
|
||||
dce_v11_0_crtc_load_lut(crtc);
|
||||
}
|
||||
|
@ -85,10 +85,10 @@ index 8edc670..0129543 100644
|
|||
static void dce_v11_0_crtc_destroy(struct drm_crtc *crtc)
|
||||
{
|
||||
diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
|
||||
index 57e8014..d0d9267 100644
|
||||
index b598caa..d203894 100644
|
||||
--- a/amd/amdgpu/dce_v8_0.c
|
||||
+++ b/amd/amdgpu/dce_v8_0.c
|
||||
@@ -2525,6 +2525,24 @@ static void dce_v8_0_cursor_reset(struct drm_crtc *crtc)
|
||||
@@ -2478,6 +2478,24 @@ static void dce_v8_0_cursor_reset(struct drm_crtc *crtc)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ index 57e8014..d0d9267 100644
|
|||
static void dce_v8_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
u16 *blue, uint32_t start, uint32_t size)
|
||||
{
|
||||
@@ -2539,6 +2557,7 @@ static void dce_v8_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
@@ -2492,6 +2510,7 @@ static void dce_v8_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
}
|
||||
dce_v8_0_crtc_load_lut(crtc);
|
||||
}
|
||||
|
@ -122,10 +122,10 @@ index 57e8014..d0d9267 100644
|
|||
static void dce_v8_0_crtc_destroy(struct drm_crtc *crtc)
|
||||
{
|
||||
diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
index fedf490..c1f3c27 100644
|
||||
index edc8e86..32755a9 100644
|
||||
--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
+++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
@@ -995,6 +995,13 @@ void amdgpu_dm_crtc_destroy(struct drm_crtc *crtc)
|
||||
@@ -998,6 +998,13 @@ void amdgpu_dm_crtc_destroy(struct drm_crtc *crtc)
|
||||
kfree(crtc);
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ index fedf490..c1f3c27 100644
|
|||
static void amdgpu_dm_atomic_crtc_gamma_set(
|
||||
struct drm_crtc *crtc,
|
||||
u16 *red,
|
||||
@@ -1002,6 +1009,7 @@ static void amdgpu_dm_atomic_crtc_gamma_set(
|
||||
@@ -1005,6 +1012,7 @@ static void amdgpu_dm_atomic_crtc_gamma_set(
|
||||
u16 *blue,
|
||||
uint32_t start,
|
||||
uint32_t size)
|
||||
|
@ -147,7 +147,7 @@ index fedf490..c1f3c27 100644
|
|||
{
|
||||
struct drm_device *dev = crtc->dev;
|
||||
struct drm_property *prop = dev->mode_config.prop_crtc_id;
|
||||
@@ -1009,6 +1017,10 @@ static void amdgpu_dm_atomic_crtc_gamma_set(
|
||||
@@ -1012,6 +1020,10 @@ static void amdgpu_dm_atomic_crtc_gamma_set(
|
||||
crtc->state->mode.private_flags |= AMDGPU_CRTC_MODE_PRIVATE_FLAGS_GAMMASET;
|
||||
|
||||
drm_atomic_helper_crtc_set_property(crtc, prop, 0);
|
||||
|
@ -159,5 +159,5 @@ index fedf490..c1f3c27 100644
|
|||
|
||||
static int dm_crtc_funcs_atomic_set_property(
|
||||
--
|
||||
2.10.1
|
||||
2.11.0
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From d4a070e6d68ff7ce8ac49c6135acc759c9a1cf6e Mon Sep 17 00:00:00 2001
|
||||
From: "Luke A. Guest" <laguest@archeia.com>
|
||||
Date: Sun, 25 Sep 2016 16:01:43 +0100
|
||||
Subject: [PATCH 06/14] Remove vblank_disable_allowed assignment
|
||||
|
||||
---
|
||||
amd/amdgpu/amdgpu_irq.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/amd/amdgpu/amdgpu_irq.c b/amd/amdgpu/amdgpu_irq.c
|
||||
index 6e85e69..71358c9 100644
|
||||
--- a/amd/amdgpu/amdgpu_irq.c
|
||||
+++ b/amd/amdgpu/amdgpu_irq.c
|
||||
@@ -240,7 +240,9 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
|
||||
INIT_WORK(&adev->hotplug_work,
|
||||
amdgpu_hotplug_work_func);
|
||||
}
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
|
||||
adev->ddev->vblank_disable_allowed = true;
|
||||
+#endif
|
||||
|
||||
INIT_WORK(&adev->reset_work, amdgpu_irq_reset_work_func);
|
||||
|
||||
--
|
||||
2.10.1
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From 406bb3a83b51b2bcf61a972721aa116e69c0a771 Mon Sep 17 00:00:00 2001
|
||||
From: "Luke A. Guest" <laguest@archeia.com>
|
||||
Date: Sun, 25 Sep 2016 16:10:27 +0100
|
||||
Subject: [PATCH 07/14] Fix __drm_atomic_helper_connector_destroy_state call
|
||||
|
||||
---
|
||||
amd/dal/amdgpu_dm/amdgpu_dm_types.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
index a9de2e5..fedf490 100644
|
||||
--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
+++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
@@ -1224,7 +1224,11 @@ void amdgpu_dm_connector_atomic_destroy_state(
|
||||
struct dm_connector_state *dm_state =
|
||||
to_dm_connector_state(state);
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
+ __drm_atomic_helper_connector_destroy_state(connector->state);
|
||||
+#else
|
||||
__drm_atomic_helper_connector_destroy_state(connector, state);
|
||||
+#endif
|
||||
|
||||
kfree(dm_state);
|
||||
}
|
||||
--
|
||||
2.10.1
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
From 32422de1ddaf539d284b32de5fe43d07b7553499 Mon Sep 17 00:00:00 2001
|
||||
From 7a5d45874b1e2bbbff2d2410f38203b5b0ae67c4 Mon Sep 17 00:00:00 2001
|
||||
From: "Luke A. Guest" <laguest@archeia.com>
|
||||
Date: Sun, 25 Sep 2016 17:00:32 +0100
|
||||
Subject: [PATCH 11/14] Fix drm_atomic_helper_swap_state for 4.8.0
|
||||
Subject: [PATCH 07/11] Fix drm_atomic_helper_swap_state for 4.8.0
|
||||
|
||||
---
|
||||
amd/dal/amdgpu_dm/amdgpu_dm_types.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
index c1f3c27..60cba1a 100644
|
||||
index 32755a9..60ca073 100644
|
||||
--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
+++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
|
||||
@@ -2331,7 +2331,11 @@ int amdgpu_dm_atomic_commit(
|
||||
@@ -2528,7 +2528,11 @@ int amdgpu_dm_atomic_commit(
|
||||
* the software side now.
|
||||
*/
|
||||
|
||||
|
@ -24,5 +24,5 @@ index c1f3c27..60cba1a 100644
|
|||
/*
|
||||
* From this point state become old state really. New state is
|
||||
--
|
||||
2.10.1
|
||||
2.11.0
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
From 69207f061e13e6f02418d5706d230135abcc1a72 Mon Sep 17 00:00:00 2001
|
||||
From 7c536e8b9f73926014c0622eb101f2cf174b507b Mon Sep 17 00:00:00 2001
|
||||
From: "Luke A. Guest" <laguest@archeia.com>
|
||||
Date: Sun, 25 Sep 2016 19:19:45 +0100
|
||||
Subject: [PATCH 12/14] Add extra flag to ttm_bo_move_ttm for >=4.8.0-rc2
|
||||
Subject: [PATCH 08/11] Add extra flag to ttm_bo_move_ttm for >=4.8.0-rc2
|
||||
|
||||
---
|
||||
amd/amdgpu/amdgpu_ttm.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/amd/amdgpu/amdgpu_ttm.c b/amd/amdgpu/amdgpu_ttm.c
|
||||
index 145732a..dd691fa 100644
|
||||
index 89760f8..d102224 100644
|
||||
--- a/amd/amdgpu/amdgpu_ttm.c
|
||||
+++ b/amd/amdgpu/amdgpu_ttm.c
|
||||
@@ -344,7 +344,11 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo,
|
||||
@@ -428,7 +428,11 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo,
|
||||
if (unlikely(r)) {
|
||||
goto out_cleanup;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ index 145732a..dd691fa 100644
|
|||
out_cleanup:
|
||||
ttm_bo_mem_put(bo, &tmp_mem);
|
||||
return r;
|
||||
@@ -377,7 +381,11 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo,
|
||||
@@ -461,7 +465,11 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo,
|
||||
if (unlikely(r)) {
|
||||
return r;
|
||||
}
|
||||
|
@ -36,5 +36,5 @@ index 145732a..dd691fa 100644
|
|||
goto out_cleanup;
|
||||
}
|
||||
--
|
||||
2.10.1
|
||||
2.11.0
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
From f268e7fa537fd8e12f4023803df795b2e29747e7 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 08/14] Change seq_printf format for 64 bit context
|
||||
|
||||
---
|
||||
amd/amdgpu/amdgpu_sa.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/amd/amdgpu/amdgpu_sa.c b/amd/amdgpu/amdgpu_sa.c
|
||||
index 768a265..51d118e 100644
|
||||
--- a/amd/amdgpu/amdgpu_sa.c
|
||||
+++ b/amd/amdgpu/amdgpu_sa.c
|
||||
@@ -428,8 +428,13 @@ void amdgpu_sa_bo_dump_debug_info(struct amdgpu_sa_manager *sa_manager,
|
||||
soffset, eoffset, eoffset - soffset);
|
||||
|
||||
if (i->fence)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
|
||||
+ seq_printf(m, " protected by 0x%08x on context %llu",
|
||||
+ i->fence->seqno, i->fence->context);
|
||||
+#else
|
||||
seq_printf(m, " protected by 0x%08x on context %d",
|
||||
i->fence->seqno, i->fence->context);
|
||||
+#endif
|
||||
|
||||
seq_printf(m, "\n");
|
||||
}
|
||||
--
|
||||
2.10.1
|
||||
|
|
@ -1,36 +1,32 @@
|
|||
From 115cdb5a06b112674d9652ef44d7f19583ff0136 Mon Sep 17 00:00:00 2001
|
||||
From 4d645984264e449d6a4507af033b26daed952eac Mon Sep 17 00:00:00 2001
|
||||
From: David McFarland <corngood@gmail.com>
|
||||
Date: Wed, 26 Oct 2016 22:26:39 -0300
|
||||
Subject: [PATCH 13/14] Remove dependency on System.map
|
||||
Subject: [PATCH 09/11] Remove dependency on System.map
|
||||
|
||||
---
|
||||
amd/backport/Makefile | 3 +--
|
||||
amd/backport/Makefile | 1 -
|
||||
amd/backport/kcl_fence.c | 10 ++++++++--
|
||||
amd/backport/symbols | 3 ---
|
||||
3 files changed, 9 insertions(+), 7 deletions(-)
|
||||
amd/backport/symbols | 7 -------
|
||||
3 files changed, 8 insertions(+), 10 deletions(-)
|
||||
delete mode 100644 amd/backport/symbols
|
||||
|
||||
diff --git a/amd/backport/Makefile b/amd/backport/Makefile
|
||||
index dcc94d5..ef27e94 100644
|
||||
index ff9339d..3f2d9ea 100644
|
||||
--- a/amd/backport/Makefile
|
||||
+++ b/amd/backport/Makefile
|
||||
@@ -55,10 +55,9 @@ ccflags-y += -DOS_NAME_RHEL_7
|
||||
@@ -64,7 +64,6 @@ ccflags-y += -DOS_NAME_RHEL_7_3
|
||||
endif
|
||||
endif
|
||||
|
||||
-BACKPORT_OBJS = symbols.o
|
||||
endif
|
||||
|
||||
-BACKPORT_OBJS += kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
|
||||
+BACKPORT_OBJS = kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
|
||||
|
||||
amdgpu-y += $(addprefix ../backport/,$(BACKPORT_OBJS))
|
||||
|
||||
BACKPORT_OBJS += kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o amdgpu_kcl.o kcl_fence_array.o kcl_kthread.o
|
||||
diff --git a/amd/backport/kcl_fence.c b/amd/backport/kcl_fence.c
|
||||
index 8c697aa..85d96d3 100644
|
||||
index 54ad819..39f6d61 100644
|
||||
--- a/amd/backport/kcl_fence.c
|
||||
+++ b/amd/backport/kcl_fence.c
|
||||
@@ -25,8 +25,14 @@ struct default_wait_cb {
|
||||
@@ -52,8 +52,14 @@ struct default_wait_cb {
|
||||
struct task_struct *task;
|
||||
};
|
||||
|
||||
|
@ -49,13 +45,17 @@ index 8c697aa..85d96d3 100644
|
|||
_kcl_fence_wait_any_timeout(struct fence **fences, uint32_t count,
|
||||
diff --git a/amd/backport/symbols b/amd/backport/symbols
|
||||
deleted file mode 100644
|
||||
index 2d3f2ee..0000000
|
||||
index 68cae63..0000000
|
||||
--- a/amd/backport/symbols
|
||||
+++ /dev/null
|
||||
@@ -1,3 +0,0 @@
|
||||
@@ -1,7 +0,0 @@
|
||||
-SYMS=""
|
||||
-
|
||||
-SYMS+="fence_default_wait_cb"
|
||||
-
|
||||
-if version_lt 2.6.33; then
|
||||
- SYMS+=" kallsyms_lookup_name"
|
||||
-fi
|
||||
--
|
||||
2.10.1
|
||||
2.11.0
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
From 942064886eae63ed7aa0a63c07e9f175898dddf7 Mon Sep 17 00:00:00 2001
|
||||
From 5ab8e5e36634391a5c440bf78463226b2074485e Mon Sep 17 00:00:00 2001
|
||||
From: David McFarland <corngood@gmail.com>
|
||||
Date: Thu, 25 Aug 2016 22:17:06 -0300
|
||||
Subject: [PATCH 14/14] disable dal by default
|
||||
Subject: [PATCH 10/11] disable dal by default
|
||||
|
||||
---
|
||||
amd/amdgpu/amdgpu_drv.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/amd/amdgpu/amdgpu_drv.c b/amd/amdgpu/amdgpu_drv.c
|
||||
index 66f3242..df62815 100644
|
||||
index d6b3f35..4477865 100755
|
||||
--- a/amd/amdgpu/amdgpu_drv.c
|
||||
+++ b/amd/amdgpu/amdgpu_drv.c
|
||||
@@ -79,7 +79,7 @@ int amdgpu_vm_block_size = -1;
|
||||
int amdgpu_vm_fault_stop = 0;
|
||||
@@ -88,7 +88,7 @@ int amdgpu_vm_fault_stop = 0;
|
||||
int amdgpu_vm_debug = 0;
|
||||
int amdgpu_vram_page_split = -1;
|
||||
int amdgpu_exp_hw_support = 0;
|
||||
-int amdgpu_dal = -1;
|
||||
+int amdgpu_dal = 0;
|
||||
|
@ -21,5 +21,5 @@ index 66f3242..df62815 100644
|
|||
int amdgpu_sched_hw_submission = 2;
|
||||
int amdgpu_powerplay = -1;
|
||||
--
|
||||
2.10.1
|
||||
2.11.0
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
From 156445f6eda047ee5a5d6e4bde36c3e9ccbbd7d9 Mon Sep 17 00:00:00 2001
|
||||
From: David McFarland <corngood@gmail.com>
|
||||
Date: Thu, 29 Dec 2016 14:20:06 -0400
|
||||
Subject: [PATCH 11/11] kcl fixes for 16.50 + linux-4.8
|
||||
|
||||
---
|
||||
amd/amdgpu/dce_v6_0.c | 5 +++--
|
||||
amd/amdgpu/dce_virtual.c | 5 +++--
|
||||
amd/backport/include/kcl/kcl_drm.h | 12 ++++++++++++
|
||||
amd/backport/include/kcl/kcl_ttm.h | 2 +-
|
||||
amd/backport/kcl_drm.c | 4 ++++
|
||||
5 files changed, 23 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/amd/amdgpu/dce_v6_0.c b/amd/amdgpu/dce_v6_0.c
|
||||
index fd3eeb0..1f1874c 100644
|
||||
--- a/amd/amdgpu/dce_v6_0.c
|
||||
+++ b/amd/amdgpu/dce_v6_0.c
|
||||
@@ -1946,9 +1946,9 @@ static void dce_v6_0_cursor_reset(struct drm_crtc *crtc)
|
||||
}
|
||||
}
|
||||
|
||||
-static void dce_v6_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
- u16 *blue, uint32_t start, uint32_t size)
|
||||
+static kcl_crtc_gamma_set_callback(dce_v6_0_crtc_gamma_set)
|
||||
{
|
||||
+ kcl_crtc_gamma_set_pre
|
||||
struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
|
||||
int end = (start + size > 256) ? 256 : start + size, i;
|
||||
|
||||
@@ -1959,6 +1959,7 @@ static void dce_v6_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
amdgpu_crtc->lut_b[i] = blue[i] >> 6;
|
||||
}
|
||||
dce_v6_0_crtc_load_lut(crtc);
|
||||
+ kcl_crtc_gamma_set_suf
|
||||
}
|
||||
|
||||
static void dce_v6_0_crtc_destroy(struct drm_crtc *crtc)
|
||||
diff --git a/amd/amdgpu/dce_virtual.c b/amd/amdgpu/dce_virtual.c
|
||||
index 36e2094..11b98e2 100644
|
||||
--- a/amd/amdgpu/dce_virtual.c
|
||||
+++ b/amd/amdgpu/dce_virtual.c
|
||||
@@ -152,9 +152,9 @@ static void dce_virtual_bandwidth_update(struct amdgpu_device *adev)
|
||||
return;
|
||||
}
|
||||
|
||||
-static void dce_virtual_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
- u16 *blue, uint32_t start, uint32_t size)
|
||||
+static kcl_crtc_gamma_set_callback(dce_virtual_crtc_gamma_set)
|
||||
{
|
||||
+ kcl_crtc_gamma_set_pre
|
||||
struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
|
||||
int end = (start + size > 256) ? 256 : start + size, i;
|
||||
|
||||
@@ -164,6 +164,7 @@ static void dce_virtual_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *gre
|
||||
amdgpu_crtc->lut_g[i] = green[i] >> 6;
|
||||
amdgpu_crtc->lut_b[i] = blue[i] >> 6;
|
||||
}
|
||||
+ kcl_crtc_gamma_set_suf
|
||||
}
|
||||
|
||||
static void dce_virtual_crtc_destroy(struct drm_crtc *crtc)
|
||||
diff --git a/amd/backport/include/kcl/kcl_drm.h b/amd/backport/include/kcl/kcl_drm.h
|
||||
index 95bf640..61c38b1 100644
|
||||
--- a/amd/backport/include/kcl/kcl_drm.h
|
||||
+++ b/amd/backport/include/kcl/kcl_drm.h
|
||||
@@ -206,4 +206,16 @@ int drm_atomic_helper_resume(struct drm_device *dev,
|
||||
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
|
||||
+#define kcl_crtc_gamma_set_callback(n) int n(struct drm_crtc *crtc, \
|
||||
+ u16 *red, u16 *green, u16 *blue, uint32_t size)
|
||||
+#define kcl_crtc_gamma_set_pre uint32_t start = 0;
|
||||
+#define kcl_crtc_gamma_set_suf return 0;
|
||||
+#else
|
||||
+#define kcl_crtc_gamma_set_callback(n) void n(struct drm_crtc *crtc, \
|
||||
+ u16 *red, u16 *green, u16 *blue, uint32_t start, uint32_t size)
|
||||
+#define kcl_crtc_gamma_set_pre
|
||||
+#define kcl_crtc_gamma_set_suf
|
||||
+#endif
|
||||
+
|
||||
#endif /* AMDGPU_BACKPORT_KCL_DRM_H */
|
||||
diff --git a/amd/backport/include/kcl/kcl_ttm.h b/amd/backport/include/kcl/kcl_ttm.h
|
||||
index 52cdbc8..cdda0b5 100644
|
||||
--- a/amd/backport/include/kcl/kcl_ttm.h
|
||||
+++ b/amd/backport/include/kcl/kcl_ttm.h
|
||||
@@ -152,7 +152,7 @@ static inline int kcl_ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
|
||||
bool evict, bool no_wait_gpu,
|
||||
struct ttm_mem_reg *new_mem)
|
||||
{
|
||||
-#if defined(BUILD_AS_DKMS)
|
||||
+#if defined(BUILD_AS_DKMS) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0))
|
||||
return ttm_bo_move_accel_cleanup(bo, fence,
|
||||
evict, no_wait_gpu, new_mem);
|
||||
#else
|
||||
diff --git a/amd/backport/kcl_drm.c b/amd/backport/kcl_drm.c
|
||||
index 27d4aaa..a083c87 100644
|
||||
--- a/amd/backport/kcl_drm.c
|
||||
+++ b/amd/backport/kcl_drm.c
|
||||
@@ -178,7 +178,11 @@ static inline struct drm_plane_state *
|
||||
_kcl_drm_atomic_get_existing_plane_state(struct drm_atomic_state *state,
|
||||
struct drm_plane *plane)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
|
||||
+ return drm_atomic_get_existing_plane_state(state, plane);
|
||||
+#else
|
||||
return state->plane_states[drm_plane_index(plane)];
|
||||
+#endif
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
From 73e77e056427e2042b8d84933c02db92e17cf233 Mon Sep 17 00:00:00 2001
|
||||
From: David McFarland <corngood@gmail.com>
|
||||
Date: Thu, 29 Dec 2016 14:49:18 -0400
|
||||
Subject: [PATCH] use kernel fence_array in 4.8+
|
||||
|
||||
---
|
||||
amd/backport/include/kcl/kcl_fence_array.h | 10 ++++++++--
|
||||
amd/backport/kcl_fence_array.c | 2 +-
|
||||
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/amd/backport/include/kcl/kcl_fence_array.h b/amd/backport/include/kcl/kcl_fence_array.h
|
||||
index bb4401e..0d9f344 100644
|
||||
--- a/amd/backport/include/kcl/kcl_fence_array.h
|
||||
+++ b/amd/backport/include/kcl/kcl_fence_array.h
|
||||
@@ -19,11 +19,15 @@
|
||||
* more details.
|
||||
*/
|
||||
|
||||
-#ifndef __LINUX_FENCE_ARRAY_H
|
||||
-#define __LINUX_FENCE_ARRAY_H
|
||||
+#ifndef __KCL_FENCE_ARRAY_H
|
||||
+#define __KCL_FENCE_ARRAY_H
|
||||
|
||||
#include <linux/fence.h>
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
|
||||
+#include <linux/fence-array.h>
|
||||
+#else
|
||||
+
|
||||
/**
|
||||
* struct fence_array_cb - callback helper for fence array
|
||||
* @cb: fence callback structure for signaling
|
||||
@@ -72,4 +76,6 @@ struct fence_array *fence_array_create(int num_fences, struct fence **fences,
|
||||
u64 context, unsigned seqno,
|
||||
bool signal_on_any);
|
||||
|
||||
+#endif
|
||||
+
|
||||
#endif /* __LINUX_FENCE_ARRAY_H */
|
||||
diff --git a/amd/backport/kcl_fence_array.c b/amd/backport/kcl_fence_array.c
|
||||
index d7ee15c..1865444 100644
|
||||
--- a/amd/backport/kcl_fence_array.c
|
||||
+++ b/amd/backport/kcl_fence_array.c
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
-#if defined(BUILD_AS_DKMS)
|
||||
+#if defined(BUILD_AS_DKMS) && LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0)
|
||||
static void fence_array_cb_func(struct fence *f, struct fence_cb *cb);
|
||||
|
||||
static const char *fence_array_get_driver_name(struct fence *fence)
|
||||
--
|
||||
2.11.0
|
||||
|
Loading…
Reference in a new issue