aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1422-drm-amdgpu-Remove-KFD-PT-BOs-from-TTM-LRU-list.patch
blob: a77ea947ec8ab74364113ba4052619e7317963bf (plain)
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
From f84567605e3a03e2221e3aceb3d175fbe0ea0e37 Mon Sep 17 00:00:00 2001
From: Yong Zhao <yong.zhao@amd.com>
Date: Tue, 3 May 2016 14:56:43 -0400
Subject: [PATCH 1422/4131] drm/amdgpu: Remove KFD PT BOs from TTM LRU list

PD/PT reservation removed PD BO from TTM LRU list but did not remove
PT BOs since they share its reservation object. TTM eviction later
considers the PT BOs on the LRU list and WARNs that they are pinned.

Remove PT BOs from LRU list when KFD requests a BO to be mapped.

Change-Id: Ia82d23718919a3968fb9035e2827f3c49915cfa6
Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 023ef5e..dc62b44 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -687,6 +687,9 @@ static int map_bo_to_gpuvm(struct amdgpu_device *adev, struct amdgpu_bo *bo,
 		goto err_failed_to_vm_clear_invalids;
 	}
 
+	/* Remove PTs from LRU list (reservation removed PD only) */
+	amdgpu_vm_move_pt_bos_in_lru(adev, vm);
+
 	return 0;
 
 err_failed_to_vm_clear_invalids:
-- 
2.7.4