diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c index 6333413f51df..7b248915489a 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | |||
@@ -581,13 +581,20 @@ static int psp_v11_0_xgmi_set_topology_info(struct psp_context *psp, | |||
581 | 581 | ||
582 | static u64 psp_v11_0_xgmi_get_hive_id(struct psp_context *psp) | 582 | static u64 psp_v11_0_xgmi_get_hive_id(struct psp_context *psp) |
583 | { | 583 | { |
584 | u64 hive_id = 0; | 584 | struct ta_xgmi_shared_memory *xgmi_cmd; |
585 | int ret; | ||
586 | |||
587 | xgmi_cmd = (struct ta_xgmi_shared_memory*)psp->xgmi_context.xgmi_shared_buf; | ||
588 | memset(xgmi_cmd, 0, sizeof(struct ta_xgmi_shared_memory)); | ||
585 | 589 | ||
586 | /* Remove me when we can get correct hive_id through PSP */ | 590 | xgmi_cmd->cmd_id = TA_COMMAND_XGMI__GET_HIVE_ID; |
587 | if (psp->adev->gmc.xgmi.num_physical_nodes) | ||
588 | hive_id = 0x123456789abcdef; | ||
589 | 591 | ||
590 | return hive_id; | 592 | /* Invoke xgmi ta to get hive id */ |
593 | ret = psp_xgmi_invoke(psp, xgmi_cmd->cmd_id); | ||
594 | if (ret) | ||
595 | return 0; | ||
596 | else | ||
597 | return xgmi_cmd->xgmi_out_message.get_hive_id.hive_id; | ||
591 | } | 598 | } |
592 | 599 | ||
593 | static u64 psp_v11_0_xgmi_get_node_id(struct psp_context *psp) | 600 | static u64 psp_v11_0_xgmi_get_node_id(struct psp_context *psp) |