[SWDEV-528647/SWDEV-528450] Reduce API load times and libdrm/libdrm_amdgpu dynamic loading (#333)
Changes:
- Removed libdrm/libdrm_amdgpu dependencies
- Added/updated new internal libdrm/libdrm_amdgpu/xf86drm APIs
to allow our APIs to reference before dynamic loading
the libdrm/libdrm_amdgpu libraries:
1. amdgpu_drm.h to what's seen in mainline
2. Added xf86drm.h to whats seen in mainline
- Modified internal DRM capabilities:
1. Require each API to independently connect to libdrm/libdrm_amdgpu
+ validate API handles reponses accordingly
2. Initialization of AMD SMI no longer has as strong of a tie to
libdrm
- Updated internal implementations of several APIs which have
connections to libdrm/libdrm_amdgpu or APIs which have conflicts
with open libdrm/libdrm_amdgpu connections:
1. amdsmi_init()
2. amdsmi_get_gpu_vram_usage()
3. amdsmi_get_gpu_asic_info()
4. amdsmi_get_gpu_vram_info()
5. amdsmi_get_gpu_vbios_info()
6. amdsmi_get_gpu_driver_info()
7. amdsmi_get_gpu_virtualization_mode()
8. amdsmi_set_gpu_memory_partition()
9. amdsmi_set_gpu_memory_partition_mode()
- Cleaned up effected tests/APIs
Change-Id: I96e2cf1b06b0cfee1b01a5e991ccc6116c4245a8
此提交包含在:
@@ -57,6 +57,19 @@ std::string smi_amdgpu_get_status_string(amdsmi_status_t ret, bool fullStatus);
|
||||
amdsmi_status_t smi_clear_char_and_reinitialize(char buffer[], uint32_t len,
|
||||
std::string newString);
|
||||
amdsmi_status_t amdsmi_get_gpu_cper_entries_by_path(const char *amdgpu_ring_cper_file, uint32_t severity_mask, char *cper_data, uint64_t *buf_size, amdsmi_cper_hdr_t **cper_hdrs, uint64_t *entry_count, uint64_t *cursor);
|
||||
/**
|
||||
* @brief Wait for user input, a debugging function to pause the program
|
||||
*
|
||||
* @details This function will wait for user input before continuing.
|
||||
* It is useful for debugging purposes to allow the user to inspect the state of the program
|
||||
* before it continues. The function will print a message to the console and then wait for
|
||||
* the user to press Enter. Once Enter is pressed, the function will return and the program
|
||||
* will continue executing.
|
||||
*
|
||||
* @note This function is intended for debugging purposes only and should not be used in production code.
|
||||
* It will block the program execution and cause it to wait indefinitely for user input.
|
||||
*/
|
||||
void amdsmi_wait_for_user_input(void);
|
||||
|
||||
/**
|
||||
* @brief Get the device index given the processor handle.
|
||||
|
||||
新增問題並參考
封鎖使用者