aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0507-drm-amdgpu-fix-error-checking-when-reuse-vmid-on-sam.patch
blob: 2b4f3d4973fefa71cbe8c29985440d8979c4a31a (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
35
36
37
38
39
40
41
From 1da67dcc1d2a4d088e525d01c6c1489d148b9539 Mon Sep 17 00:00:00 2001
From: Chunming Zhou <David1.Zhou@amd.com>
Date: Thu, 14 Apr 2016 15:53:55 +0800
Subject: [PATCH 0507/1110] drm/amdgpu: fix error checking when reuse vmid on
 same ring
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 4a896d7..4f16688 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -198,7 +198,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
 		if (pd_addr != id->pd_gpu_addr)
 			continue;
 
-		if (id != vm->ids[ring->idx] &&
+		if (id->last_user != ring &&
 		    (!id->last_flush || !fence_is_signaled(id->last_flush)))
 			continue;
 
@@ -207,7 +207,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
 			continue;
 
 		/* Good we can use this VMID */
-		if (id == vm->ids[ring->idx]) {
+		if (id->last_user == ring) {
 			r = amdgpu_sync_fence(ring->adev, sync,
 					      id->first);
 			if (r)
-- 
2.7.4