[PATCH 02/13] drm/amdgpu/gmc: add initial xgmi structure to amdgpu_gmc structure

shaoyunl Shaoyun.Liu at amd.com
Wed Sep 5 15:28:35 UTC 2018


From: Alex Deucher <alexander.deucher at amd.com>

Initial pass at a structure to store xgmi info.  xgmi is a high
speed cross gpu interconnect.

Acked-by: Huang Rui <ray.huang at amd.com>
Acked-by: Slava Abramov <slava.abramov at amd.com>
Reviewed-by :Shaoyun liu <Shaoyun.liu at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

Change-Id: I8b373bd847c857dd7cbefa55d1ede2a8785deb06
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
index 17ffc35..bfb0a7e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
@@ -87,6 +87,14 @@ struct amdgpu_gmc_funcs {
 			   u64 *dst, u64 *flags);
 };
 
+struct amdgpu_xgmi {
+	u64 device_id; /* from psp */
+	u64 hive_id; /* from psp */
+	u64 node_segment_size; /* fixed per family */
+	unsigned physical_node_id; /* physical node (0-3) */
+	unsigned num_physical_nodes; /* number of nodes (0-4) */
+};
+
 struct amdgpu_gmc {
 	resource_size_t		aper_size;
 	resource_size_t		aper_base;
@@ -125,6 +133,8 @@ struct amdgpu_gmc {
 	atomic_t		vm_fault_info_updated;
 
 	const struct amdgpu_gmc_funcs	*gmc_funcs;
+
+	struct amdgpu_xgmi xgmi;
 };
 
 #define amdgpu_gmc_flush_gpu_tlb(adev, vmid) (adev)->gmc.gmc_funcs->flush_gpu_tlb((adev), (vmid))
-- 
2.7.4



More information about the amd-gfx mailing list