[Mesa-dev] [PATCH v2] gbm: add support for loading third-party backend (v2)

Emil Velikov emil.l.velikov at gmail.com
Sat Apr 8 18:58:53 UTC 2017


On 7 April 2017 at 08:28, Qiang Yu <Qiang.Yu at amd.com> wrote:
> V2:
>   1. export gbmint.h and test backend/libgbm ABI compatible
>   2. drop GBM_BACKEND_DIR, specify backend path in config file
>   3. add GBM_CONFIG_DIR for config file
>   4. add per backend priority
>   5. take care of thread safe
>
> Third-party can put their backend to a directory and create a
> /etc/gbm.conf.d/*.conf file which contains the backend so file
> path to overwrite the default builtin DRI backend.
>
> The /etc/gbm.conf.d/*.conf will be sorted and the backends added
> will be tried one-by-one until one can successfully create a gbm
> device. The default DRI backend is tried at last.
>
> /etc/gbm.conf.d/*.conf can also contain a "priority" field.
> backend with bigger number will be tried first. Default priority
> is 1000 inlcuding the builtin backend.
>
> GBM config file example:
> lib:/opt/amdgpu-pro/lib/gbm/amdgpu.so
> priority:2000
>
> People can still use GBM_BACKEND to overwrite the backend try
> order.
>
What happened with the idea of reusing your existing amdgpu_dri.so ?
As mentioned before the DRI loader (libgbm) <> DRI driver (foo_dri.so)
interface is stable, so things should just work.

If you are concerned about the loader picking radeonsi_dri.so over
amdgpu_dri.so, simply do "export MESA_LOADER_DRIVER_OVERRIDE=amdgpu"
and enjoy.

Thanks
Emil


More information about the mesa-dev mailing list