Commit 5a545e35 authored by Sonny Jiang's avatar Sonny Jiang Committed by Marek Olšák

loader: always map the "amdgpu" kernel driver name to radeonsi (v2)

v2: cleanup
Signed-off-by: Sonny Jiang's avatarSonny Jiang <sonny.jiang@amd.com>
Signed-off-by: default avatarMarek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer's avatarPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
parent 94297142
......@@ -459,6 +459,15 @@ loader_get_driver_for_fd(int fd)
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment