aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1710-drm-amdgpu-Use-mutex-on-invalidate-tlb-with-MMIO-cod.patch
blob: 07ab294d20ba58606bc08afc8ceed0b80ebeed6f (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
From 5ae60bbbc0ca9b9583d582a6901807dabf23e8e4 Mon Sep 17 00:00:00 2001
From: Shaoyun Liu <Shaoyun.Liu@amd.com>
Date: Thu, 25 May 2017 18:24:00 -0400
Subject: [PATCH 1710/4131] drm/amdgpu: Use mutex on invalidate tlb with MMIO
 code path for Vega10

Change-Id: I60819c65229d1fe2412e273be0d0951ebed2d815
Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
index 99abdf3..33b4077 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
@@ -920,6 +920,8 @@ static void write_vmid_invalidate_request(struct kgd_dev *kgd, uint8_t vmid)
 		VM_INVALIDATE_ENG16_REQ__INVALIDATE_L2_PDE2_MASK |
 		VM_INVALIDATE_ENG16_REQ__INVALIDATE_L1_PTES_MASK;
 
+	mutex_lock(&adev->srbm_mutex);
+
 	/* Use light weight invalidation.
 	 *
 	 * TODO 1: agree on the right set of invalidation registers for
-- 
2.7.4