All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 02/13] drm/amdgpu/gmc: add initial xgmi structure to amdgpu_gmc structure
@ 2018-09-05 15:28 shaoyunl
       [not found] ` <1536161315-4180-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: shaoyunl @ 2018-09-05 15:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

From: Alex Deucher <alexander.deucher@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@amd.com>
Acked-by: Slava Abramov <slava.abramov@amd.com>
Reviewed-by :Shaoyun liu <Shaoyun.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 02/13] drm/amdgpu/gmc: add initial xgmi structure to amdgpu_gmc structure
       [not found] ` <1536161315-4180-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>
@ 2018-09-06  7:31   ` Christian König
  0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2018-09-06  7:31 UTC (permalink / raw)
  To: shaoyunl, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Am 05.09.2018 um 17:28 schrieb shaoyunl:
> From: Alex Deucher <alexander.deucher@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@amd.com>
> Acked-by: Slava Abramov <slava.abramov@amd.com>
> Reviewed-by :Shaoyun liu <Shaoyun.liu@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@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) */
> +};
> +

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

Christian.

>   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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-06  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 15:28 [PATCH 02/13] drm/amdgpu/gmc: add initial xgmi structure to amdgpu_gmc structure shaoyunl
     [not found] ` <1536161315-4180-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>
2018-09-06  7:31   ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.