diff options
author | Jeremy Newton <[email protected]> | 2019-07-10 10:23:53 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-19 19:59:02 -0400 |
commit | 666ea30017648197a786dbe26124da791ba6897e (patch) | |
tree | 470ffc729a94eb27f5ed0912d089a25175a9922e /src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c | |
parent | 1a25980c469b38d2c6456344fe538ad1bcb47f63 (diff) |
pipe-loader: use radeonsi for MM if amdgpu dri is used
The amdgpu dri is used for the closed source AMD driver. Since this driver
does not implement multimedia, we fall back to radeonsi in mesa to do
multimedia. This corrects the dri driver name for when it is set to amdgpu.
Reviewed-by: Michel Dänzer <[email protected]> (v1)
Signed-off-by: Jeremy Newton <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c')
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c index 960d63b2c31..45b941e1f13 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c @@ -194,6 +194,15 @@ pipe_loader_drm_probe_fd_nodup(struct pipe_loader_device **dev, int fd) if (!ddev->base.driver_name) goto fail; + /* For the closed source AMD OpenGL driver, we want libgbm to load + * "amdgpu_dri.so", but we want Gallium multimedia drivers to load + * "radeonsi". So change amdgpu to radeonsi for Gallium. + */ + if (strcmp(ddev->base.driver_name, "amdgpu") == 0) { + FREE(ddev->base.driver_name); + ddev->base.driver_name = strdup("radeonsi"); + } + struct util_dl_library **plib = NULL; #ifndef GALLIUM_STATIC_TARGETS plib = &ddev->lib; |