drm/amdgpu: Add place holder functions for xgmi topology interface with psp
Subsystems (2)
PATCH 6/12 drm/amdgpu: Add place holder functions for xgmi topology interface with psp
From: Shaoyun Liu <[email protected]>
Add dummy function for xgmi function interface with psp
--- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +29 -0
@@ -548,6 +548,32 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)return 0 ; } +/* TODO: Fill in follow functions once PSP firmware interface for XGMI is ready. +* For now, return success and hack the hive_id so high level code can +* start testing */ +static int psp_v11_0_xgmi_get_topology_info (struct psp_context *psp, +int number_devices,struct psp_xgmi_topology_info *topology) +{ +return 0 ; +} + +static int psp_v11_0_xgmi_set_topology_info (struct psp_context *psp, +int number_devices,struct psp_xgmi_topology_info *topology) +{ +return 0 ; +} + +static u64 psp_v11_0_xgmi_get_hive_id (struct psp_context *psp) +{ +u64 hive_id =0 ; + +/* Remove me when we can get correct hive_id through PSP */ +if (psp->adev->gmc.xgmi.num_physical_nodes) + hive_id =0x123456789abcdef ; + +return hive_id; +} +static const struct psp_funcs psp_v11_0_funcs = { .init_microcode = psp_v11_0_init_microcode, .bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv,
@@ -560,6 +586,9 @@ static const struct psp_funcs psp_v11_0_funcs = { .cmd_submit = psp_v11_0_cmd_submit, .compare_sram_data = psp_v11_0_compare_sram_data, .mode1_reset = psp_v11_0_mode1_reset, + .xgmi_get_topology_info = psp_v11_0_xgmi_get_topology_info, + .xgmi_set_topology_info = psp_v11_0_xgmi_set_topology_info, + .xgmi_get_hive_id = psp_v11_0_xgmi_get_hive_id, };void psp_v11_0_set_psp_funcs (struct psp_context *psp)
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): 1536351015-31277-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org
Huang Rui
Reviewed-byQuoted 7 lines · shaoyunl
From: Shaoyun Liu <[email protected]>
Add dummy function for xgmi function interface with psp
Change-Id I01f35baf5a4b96e9654d448c9892be3cd72c05b7Signed-off-by Shaoyun Liu <[email protected]>Reviewed-by Felix Kuehling <[email protected]>
Patch looks good.
Only a minor comment below, but anyway, feel free to add
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c static int psp_v11_0_mode1_reset(struct psp_context *psp) · line 553
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +3
-0@@ -548,6 +548,32 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)return 0 ; } +/* TODO: Fill in follow functions once PSP firmware interface for XGMI is ready. +* For now, return success and hack the hive_id so high level code can +* start testing */
Block comments use a trailing */ on a separate line.
/*
* TODO: Fill in follow functions once PSP firmware interface for XGMI is ready.
* For now, return success and hack the hive_id so high level code can
* start testing
*/
Thanks,
Ray
Quoted 43 lines
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +26
-0+static int psp_v11_0_xgmi_get_topology_info (struct psp_context *psp, +int number_devices,struct psp_xgmi_topology_info *topology) +{ +return 0 ; +} + +static int psp_v11_0_xgmi_set_topology_info (struct psp_context *psp, +int number_devices,struct psp_xgmi_topology_info *topology) +{ +return 0 ; +} + +static u64 psp_v11_0_xgmi_get_hive_id (struct psp_context *psp) +{ +u64 hive_id =0 ; + +/* Remove me when we can get correct hive_id through PSP */ +if (psp->adev->gmc.xgmi.num_physical_nodes) + hive_id =0x123456789abcdef ; + +return hive_id; +} +static const struct psp_funcs psp_v11_0_funcs = { .init_microcode = psp_v11_0_init_microcode, .bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv,@@ -560,6 +586,9 @@ static const struct psp_funcs psp_v11_0_funcs = { .cmd_submit = psp_v11_0_cmd_submit, .compare_sram_data = psp_v11_0_compare_sram_data, .mode1_reset = psp_v11_0_mode1_reset, + .xgmi_get_topology_info = psp_v11_0_xgmi_get_topology_info, + .xgmi_set_topology_info = psp_v11_0_xgmi_set_topology_info, + .xgmi_get_hive_id = psp_v11_0_xgmi_get_hive_id, };void psp_v11_0_set_psp_funcs (struct psp_context *psp)Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx