Get and set the XGMI PLPD

Update the API and CLI to support XGMI Per-Link Power Down Policy.

Change-Id: Iaf04a771eb8bb0829a5b3088d803a7355a8dfd0b


[ROCm/amdsmi commit: e4085c6414]
이 커밋은 다음에 포함됨:
Bill(Shuzhou) Liu 작성하고 Maisam Arif가 2024-03-26 01:48:14 -05:00를 커밋함
1 부모 16b0ff1657
커밋 b9b958b82c
11 파일이 변경됨
+467 -50

검색과 일치하는 파일 없음

+43
파일 보기
@@ -3405,6 +3405,49 @@ amdsmi_status_t amdsmi_get_dpm_policy(amdsmi_processor_handle processor_handle,
*/
amdsmi_status_t amdsmi_set_dpm_policy(amdsmi_processor_handle processor_handle,
uint32_t policy_id);
/**
* @brief Get the xgmi per-link power down policy parameter for the processor
*
* @platform{gpu_bm_linux}
*
* @details Given a processor handle @p processor_handle, this function will write
* current xgmi plpd settings to @p policy. All the processors at the same socket
* will have the same policy.
*
* @param[in] processor_handle a processor handle
*
* @param[in, out] policy the xgmi plpd for this processor.
* If this parameter is nullptr, this function will return
* ::AMDSMI_STATUS_INVAL
*
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
*/
amdsmi_status_t amdsmi_get_xgmi_plpd(amdsmi_processor_handle processor_handle,
amdsmi_dpm_policy_t* xgmi_plpd);
/**
* @brief Set the xgmi per-link power down policy parameter for the processor
*
* @platform{gpu_bm_linux}
*
* @details Given a processor handle @p processor_handle and a dpm policy @p plpd_id,
* this function will set the xgmi plpd for this processor. All the processors at
* the same socket will be set to the same policy.
*
* @note This function requires root access
*
* @param[in] processor_handle a processor handle
*
* @param[in] xgmi_plpd_id the xgmi plpd id to set. The id is the id in
* amdsmi_dpm_policy_entry_t, which can be obtained by calling
* amdsmi_get_xgmi_plpd()
*
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
*/
amdsmi_status_t amdsmi_set_xgmi_plpd(amdsmi_processor_handle processor_handle,
uint32_t plpd_id);
/** @} End PerfCont */
/*****************************************************************************/