diff options
author | Jiang, Sonny <[email protected]> | 2019-09-03 22:33:57 +0000 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-09-23 15:14:11 -0400 |
commit | 5a545e355b237dfdae428ef7f5d7442f36573645 (patch) | |
tree | 610d3651fdc384f4719ecc7afbb886b956d623c5 /src/loader | |
parent | 94297142332fbd42bf281c6b6e3b418d9479d63e (diff) |
loader: always map the "amdgpu" kernel driver name to radeonsi (v2)
v2: cleanup
Signed-off-by: Sonny Jiang <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/loader')
-rw-r--r-- | src/loader/loader.c | 9 |
1 files changed, 9 insertions, 0 deletions
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) |