From: Jiang, Sonny Date: Tue, 3 Sep 2019 22:33:57 +0000 (+0000) Subject: loader: always map the "amdgpu" kernel driver name to radeonsi (v2) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a545e355b237dfdae428ef7f5d7442f36573645;p=mesa.git loader: always map the "amdgpu" kernel driver name to radeonsi (v2) v2: cleanup Signed-off-by: Sonny Jiang Signed-off-by: Marek Olšák Acked-by: Pierre-Eric Pelloux-Prayer --- diff --git a/src/loader/loader.c b/src/loader/loader.c index 6894c65114f..a45328e2464 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -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)