[2/2] loader: driver name radeonsi chosen from kernel name amdgpu

Submitted by Jiang, Sonny on Sept. 3, 2019, 10:33 p.m.

Details

Message ID 20190903223318.11222-2-sonny.jiang@amd.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Jiang, Sonny Sept. 3, 2019, 10:33 p.m.
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
---
 src/loader/loader.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/loader/loader.c b/src/loader/loader.c
index d8d71c30200..45834aa2082 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -457,6 +457,14 @@  loader_get_driver_for_fd(int fd)
       return driver;
 #endif
 
+   driver = loader_get_kernel_driver_name(fd);
+   if (driver && strcmp(driver, "amdgpu") == 0) {
+      free(driver);
+      driver = strdup("radeonsi");
+      return driver;
+   } else
+      free(driver);
+
    if (!loader_get_pci_id_for_fd(fd, &vendor_id, &chip_id)) {
       driver = loader_get_kernel_driver_name(fd);
       if (driver)