[SWDEV-463402] - Support retrieving connection type and P2P capabilities between two GPUs
1. Add a API interface amdsmi_topo_get_p2p_status to retrieve connection type and P2P capabilities between 2 GPUs. 2. Add getting p2p status test in hw_topology_read to print P2P capability information. 3. Add below tables for cli topology sub commands: - CACHE COHERANCY TABLE - ATOMICS TABLE - DMA TABLE - BI-DIRECTIONAL TABLE Change-Id: I199173030d4170115cea27c472958a4826e4e1bf Signed-off-by: Tim Huang <tim.huang@amd.com>
このコミットが含まれているのは:
@@ -690,6 +690,17 @@ typedef struct {
|
||||
uint32_t reserved[4];
|
||||
} amdsmi_proc_info_t;
|
||||
|
||||
/**
|
||||
* @brief IO Link P2P Capability
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t is_iolink_coherent; // 1 = true, 0 = false, UINT8_MAX = Not defined.
|
||||
uint8_t is_iolink_atomics_32bit;
|
||||
uint8_t is_iolink_atomics_64bit;
|
||||
uint8_t is_iolink_dma;
|
||||
uint8_t is_iolink_bi_directional;
|
||||
} amdsmi_p2p_capability_t;
|
||||
|
||||
|
||||
//! Guaranteed maximum possible number of supported frequencies
|
||||
#define AMDSMI_MAX_NUM_FREQUENCIES 33
|
||||
@@ -4283,6 +4294,36 @@ amdsmi_is_P2P_accessible(amdsmi_processor_handle processor_handle_src,
|
||||
amdsmi_processor_handle processor_handle_dst,
|
||||
bool *accessible);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Retrieve connection type and P2P capabilities between 2 GPUs
|
||||
*
|
||||
* @platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}
|
||||
*
|
||||
* @details Given a source processor handle @p processor_handle_src and
|
||||
* a destination processor handle @p processor_handle_dst, a pointer to an amdsmi_io_link_type_t @p type,
|
||||
* and a pointer to amdsmi_p2p_capability_t @p cap. This function will write the connection type,
|
||||
* and io link capabilities between the device
|
||||
* @p processor_handle_src and @p processor_handle_dst to the memory
|
||||
* pointed to by @p cap and @p type.
|
||||
*
|
||||
* @param[in] processor_handle_src the source processor handle
|
||||
*
|
||||
* @param[in] processor_handle_dst the destination processor handle
|
||||
*
|
||||
* @param[in,out] type A pointer to an ::amdsmi_io_link_type_t to which the
|
||||
* type for the connection should be written.
|
||||
*
|
||||
* @param[in,out] type A pointer to an ::amdsmi_p2p_capability_t to which the
|
||||
* io link capabilities should be written.
|
||||
*
|
||||
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
|
||||
*/
|
||||
amdsmi_status_t
|
||||
amdsmi_topo_get_p2p_status(amdsmi_processor_handle processor_handle_src,
|
||||
amdsmi_processor_handle processor_handle_dst,
|
||||
amdsmi_io_link_type_t *type, amdsmi_p2p_capability_t *cap);
|
||||
|
||||
/** @} End HWTopo */
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする