v2: cleanup
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
return driver;
#endif
+ driver = loader_get_kernel_driver_name(fd);
+ bool is_amdgpu = driver && strcmp(driver, "amdgpu") == 0;
+ free(driver);
+
+ if (is_amdgpu) {
+ driver = strdup("radeonsi");
+ goto out;
+ }
+
if (!loader_get_pci_id_for_fd(fd, &vendor_id, &chip_id)) {
driver = loader_get_kernel_driver_name(fd);
if (driver)