aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1412-drm-amdgpu-Add-PDE0-vm-fault-as-invalid-address-prot.patch
blob: 28195a60acb3a61a47537af93a14b140a5cd5a43 (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
From 36b2b147458523adb8d287c30ce3aa7371a9f97c Mon Sep 17 00:00:00 2001
From: shaoyunl <Shaoyun.Liu@amd.com>
Date: Mon, 4 Apr 2016 16:35:03 -0400
Subject: [PATCH 1412/4131] drm/amdgpu: Add PDE0 vm fault as invalid address
 protection fault

The VM generally raises two kind of invalid address protection fault:
PDE0 (page directory entry not present) or VALID(page table entry
not valid). Both need to be reported as invalid protection fault to user.

Change-Id: I012ff65e4c9def01534897887cafdc127b7c07d1
Signed-off-by: shaoyun liu <shaoyun.liu@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 378f115..91f9ea4 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -773,7 +773,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 & 0x4 ? true : false;
+		info->prot_valid = protections & 0x6 ? 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 737a623..e306006 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -989,7 +989,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 & 0x4 ? true : false;
+		info->prot_valid = protections & 0x6 ? 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