aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1674-drm-amdgpu-Record-gfx7-gfx8-VM-range-fault-as-not-pr.patch
blob: a186e2ba879166b812aee92b51e5f4fded7a27f8 (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
42
43
44
45
46
47
From eb0d49b40a0ce0caf01f906d36e23419643f0da7 Mon Sep 17 00:00:00 2001
From: Jay Cornwall <Jay.Cornwall@amd.com>
Date: Tue, 2 May 2017 20:02:49 -0500
Subject: [PATCH 1674/4131] drm/amdgpu: Record gfx7/gfx8 VM range fault as
 not-present

A range fault (address outside VMID start/end range) should be
reported to the KFD as a not-present fault.

Fixes KFD memory event trigger on range faults.

Change-Id: I6fe281617ed36441213fad2a599e6c2760a2e40f
Signed-off-by: Jay Cornwall <Jay.Cornwall@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index 9595023..3bc2537 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -776,7 +776,7 @@ static void gmc_v7_0_vm_decode_fault(struct amdgpu_device *adev,
 		info->vmid = vmid;
 		info->mc_id = mc_id;
 		info->page_addr = addr;
-		info->prot_valid = protections & 0x6 ? true : false;
+		info->prot_valid = protections & 0x7 ? true : false;
 		info->prot_read = protections & 0x8 ? true : false;
 		info->prot_write = protections & 0x10 ? true : false;
 		info->prot_exec = protections & 0x20 ? true : false;
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index cb3fe87..2a4dac6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -996,7 +996,7 @@ static void gmc_v8_0_vm_decode_fault(struct amdgpu_device *adev,
 		info->vmid = vmid;
 		info->mc_id = mc_id;
 		info->page_addr = addr;
-		info->prot_valid = protections & 0x6 ? true : false;
+		info->prot_valid = protections & 0x7 ? true : false;
 		info->prot_read = protections & 0x8 ? true : false;
 		info->prot_write = protections & 0x10 ? true : false;
 		info->prot_exec = protections & 0x20 ? true : false;
-- 
2.7.4