diff options
author | Shaoyun Liu <Shaoyun.Liu@amd.com> | 2018-08-14 13:30:00 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-10 23:47:43 -0400 |
commit | 78122127a4180306e2360b7a9e418eed21f76cf3 (patch) | |
tree | 1274a826136a24a3160b6df5e35b0304651c7ba7 | |
parent | 6449724058c66408df599cd0b97d9df531137a08 (diff) |
drm/amdgpu: Add place holder functions for xgmi topology interface with psp
Add dummy function for xgmi function interface with psp
Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c index b70cfa3fe1b2..9217af00bc8d 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | |||
@@ -548,6 +548,33 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp) | |||
548 | return 0; | 548 | return 0; |
549 | } | 549 | } |
550 | 550 | ||
551 | /* TODO: Fill in follow functions once PSP firmware interface for XGMI is ready. | ||
552 | * For now, return success and hack the hive_id so high level code can | ||
553 | * start testing | ||
554 | */ | ||
555 | static int psp_v11_0_xgmi_get_topology_info(struct psp_context *psp, | ||
556 | int number_devices, struct psp_xgmi_topology_info *topology) | ||
557 | { | ||
558 | return 0; | ||
559 | } | ||
560 | |||
561 | static int psp_v11_0_xgmi_set_topology_info(struct psp_context *psp, | ||
562 | int number_devices, struct psp_xgmi_topology_info *topology) | ||
563 | { | ||
564 | return 0; | ||
565 | } | ||
566 | |||
567 | static u64 psp_v11_0_xgmi_get_hive_id(struct psp_context *psp) | ||
568 | { | ||
569 | u64 hive_id = 0; | ||
570 | |||
571 | /* Remove me when we can get correct hive_id through PSP */ | ||
572 | if (psp->adev->gmc.xgmi.num_physical_nodes) | ||
573 | hive_id = 0x123456789abcdef; | ||
574 | |||
575 | return hive_id; | ||
576 | } | ||
577 | |||
551 | static const struct psp_funcs psp_v11_0_funcs = { | 578 | static const struct psp_funcs psp_v11_0_funcs = { |
552 | .init_microcode = psp_v11_0_init_microcode, | 579 | .init_microcode = psp_v11_0_init_microcode, |
553 | .bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv, | 580 | .bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv, |
@@ -560,6 +587,9 @@ static const struct psp_funcs psp_v11_0_funcs = { | |||
560 | .cmd_submit = psp_v11_0_cmd_submit, | 587 | .cmd_submit = psp_v11_0_cmd_submit, |
561 | .compare_sram_data = psp_v11_0_compare_sram_data, | 588 | .compare_sram_data = psp_v11_0_compare_sram_data, |
562 | .mode1_reset = psp_v11_0_mode1_reset, | 589 | .mode1_reset = psp_v11_0_mode1_reset, |
590 | .xgmi_get_topology_info = psp_v11_0_xgmi_get_topology_info, | ||
591 | .xgmi_set_topology_info = psp_v11_0_xgmi_set_topology_info, | ||
592 | .xgmi_get_hive_id = psp_v11_0_xgmi_get_hive_id, | ||
563 | }; | 593 | }; |
564 | 594 | ||
565 | void psp_v11_0_set_psp_funcs(struct psp_context *psp) | 595 | void psp_v11_0_set_psp_funcs(struct psp_context *psp) |