From 5a545e355b237dfdae428ef7f5d7442f36573645 Mon Sep 17 00:00:00 2001 From: "Jiang, Sonny" Date: Tue, 3 Sep 2019 22:33:57 +0000 Subject: [PATCH] loader: always map the "amdgpu" kernel driver name to radeonsi (v2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit v2: cleanup Signed-off-by: Sonny Jiang Signed-off-by: Marek Olšák Acked-by: Pierre-Eric Pelloux-Prayer --- src/loader/loader.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/loader/loader.c b/src/loader/loader.c index 6894c65..a45328e 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) -- 2.7.4