summary refs log tree commit diff
path: root/pkgs/os-specific/linux/amdgpu-pro/patches/0008-Add-extra-flag-to-ttm_bo_move_ttm-for-4.8.0-rc2.patch
blob: 8674c3537e8826ae563ebc826141949e738a9c59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 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 89760f8..d102224 100644
--- a/amd/amdgpu/amdgpu_ttm.c
+++ b/amd/amdgpu/amdgpu_ttm.c
@@ -428,7 +428,11 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo,
 	if (unlikely(r)) {
 		goto out_cleanup;
 	}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+	r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, new_mem);
+#else
 	r = ttm_bo_move_ttm(bo, true, no_wait_gpu, new_mem);
+#endif
 out_cleanup:
 	ttm_bo_mem_put(bo, &tmp_mem);
 	return r;
@@ -461,7 +465,11 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo,
 	if (unlikely(r)) {
 		return r;
 	}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+	r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, &tmp_mem);
+#else
 	r = ttm_bo_move_ttm(bo, true, no_wait_gpu, &tmp_mem);
+#endif
 	if (unlikely(r)) {
 		goto out_cleanup;
 	}
-- 
2.11.0