[SWDEV-499029] Fix unable to change memory partition modes

Changes:
  * [API] Removed checking board name, fixes for other MI ASICs
  * [API] Fixed unable to restart AMD GPU, libdrm blocked
    doing this operation
  * [API] Added ability to unload/reload libdrm
    from within AMD SMI APIs
  * [CLI] Increased progress bar to change memory partition modes
    to 140 seconds, since driver reload is variable per system

Change-Id: I52f227f2ab850c4a6332ff3ecdc899903b1080f1
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
This commit is contained in:
Charis Poag
2024-11-21 22:35:43 -06:00
parent 35d8e827b9
commit 7d061f9ae4
8 changed files with 207 additions and 92 deletions
@@ -49,6 +49,7 @@ class AMDSmiLibraryLoader {
private:
void* libHandler_;
std::mutex library_mutex_;
bool library_loaded_ = false;
};
template<typename T> amdsmi_status_t AMDSmiLibraryLoader::load_symbol(
+5
View File
@@ -57,6 +57,11 @@ class AMDSmiSystem {
amdsmi_status_t get_cpu_family(uint32_t *cpu_family);
amdsmi_status_t get_cpu_model(uint32_t *cpu_model);
amdsmi_status_t clean_up_drm() { return drm_.cleanup();}
amdsmi_status_t init_drm() { return drm_.init();}
private:
AMDSmiSystem() : init_flag_(AMDSMI_INIT_AMD_GPUS) {}