Skip to contentSkip to conversation

drm/amdgpu/gmc: add initial xgmi structure to amdgpu_gmc structure

PATCH In review shaoyunl 2 participants 2 messages Sep 5, 2018 – Sep 6, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

shaoyunl

author
#0 lore raw

PATCH 2/13 drm/amdgpu/gmc: add initial xgmi structure to amdgpu_gmc structure

From: Alex Deucher <[email protected]>

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

Change-Id: I8b373bd847c857dd7cbefa55d1ede2a8785deb06

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h +10 -0
index 17ffc35..bfb0a7e 100644
@@ -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))
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1536161315-4180-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 05.09.2018 um 17:28 schrieb shaoyunl:

Quoted 21 lines

From: Alex Deucher <[email protected]>

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

Change-Id: I8b373bd847c857dd7cbefa55d1ede2a8785deb06

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 10 ++++++++++
  1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h +0 -0
index 17ffc35..bfb0a7e 100644
@@ -87,6 +87,14 @@ struct amdgpu_gmc_funcs {
  			   u64 *dst, u64 *flags);

drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h struct amdgpu_gmc_funcs { · line 97

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h +8 -0
  };
 
+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) */
+};
+

Please use proper structure documentation for this and not comments after the field.

Christian.

drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h struct amdgpu_gmc { · line 140

Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h +2 -0
  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))

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx