summary refs log tree commit diff
path: root/pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch
blob: 6da3e46a3ee6f6d4ce12d398fd716a36b8b1340c (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
41
42
43
44
45
46
47
48
From c41c15fa04e363c41272e7b5d767710170691347 Mon Sep 17 00:00:00 2001
From: "Luke A. Guest" <laguest@archeia.com>
Date: Mon, 4 Jul 2016 19:19:45 +0100
Subject: [PATCH 5/8] LRU stuff isn't available until >= 4.7.x

---
 amd/amdgpu/amdgpu_ttm.c | 4 ++--
 amd/backport/kcl_ttm.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/amd/amdgpu/amdgpu_ttm.c b/amd/amdgpu/amdgpu_ttm.c
index 8b676c2..752d065 100644
--- a/amd/amdgpu/amdgpu_ttm.c
+++ b/amd/amdgpu/amdgpu_ttm.c
@@ -907,7 +907,7 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm,
 	return flags;
 }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
 
 static void amdgpu_ttm_lru_removal(struct ttm_buffer_object *tbo)
 {
@@ -969,7 +969,7 @@ static struct ttm_bo_driver amdgpu_bo_driver = {
 	.fault_reserve_notify = &amdgpu_bo_fault_reserve_notify,
 	.io_mem_reserve = &amdgpu_ttm_io_mem_reserve,
 	.io_mem_free = &amdgpu_ttm_io_mem_free,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
 	.lru_removal = &amdgpu_ttm_lru_removal,
 	.lru_tail = &amdgpu_ttm_lru_tail,
 	.swap_lru_tail = &amdgpu_ttm_swap_lru_tail,
diff --git a/amd/backport/kcl_ttm.c b/amd/backport/kcl_ttm.c
index 24f7a83..1a2cb7b 100644
--- a/amd/backport/kcl_ttm.c
+++ b/amd/backport/kcl_ttm.c
@@ -7,7 +7,7 @@ static int _kcl_ttm_bo_del_from_lru(struct ttm_buffer_object *bo)
 {
 	int put_count = 0;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
 	struct ttm_bo_device *bdev = bo->bdev;
 
 	if (bdev->driver->lru_removal)
-- 
2.9.3