aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1372-drm-amdgpu-Enable-BIF-5.0-atomic-promotion-to-PCIe-3.patch
blob: 291ef8e7d36e07ad2c662c21f854341ef58bb451 (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
From 1db401aab0a54eba45131c79fb1b795ab499c36c Mon Sep 17 00:00:00 2001
From: Jay Cornwall <jay@jcornwall.me>
Date: Fri, 28 Aug 2015 11:25:39 -0500
Subject: [PATCH 1372/4131] drm/amdgpu: Enable BIF 5.0 atomic promotion to PCIe
 3.0 AtomicOps

Atomic operations to system memory are normally dropped by the BIF.
Some PCIe 3.0 platforms support atomic routing to the host for execution
by the CPU. To use this feature, atomic requests must be enabled in the
GPU's PCIe configuration space.

This is a no-op on platforms which cannot route the atomic request to
the host. In this instance, atomics would be dropped with or without
this change.

Signed-off-by: Jay Cornwall <jay@jcornwall.me>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: John Bridgman <john.bridgman@amd.com>

 Conflicts:
	drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c

Change-Id: I69f0b9b616ce4b1e7e09f069cc10a110d49d7c64
---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index 114671b..3b54e9a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -1136,6 +1136,10 @@ static int gmc_v8_0_sw_init(void *handle)
 		adev->vm_manager.vram_base_offset = 0;
 	}
 
+	/* Allow BIF to recode atomics to PCIe 3.0 AtomicOps.
+	 */
+	pci_enable_atomic_request(adev->pdev);
+
 	return 0;
 }
 
-- 
2.7.4