gbm: Support dynamically loading named backends
authorJames Jones <jajones@nvidia.com>
Sat, 14 Dec 2019 02:05:39 +0000 (18:05 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 6 Jul 2021 16:57:59 +0000 (16:57 +0000)
commit68902822d6e0133f3e51f08b9ce86c86b34bc651
tree39f9ad5193efe62647689ecae0a15bc9efa28d76
parent8c935464ad2d3cf11f03d896a7fcb9d147c61e56
gbm: Support dynamically loading named backends

If the user specifies a backend name explicitly
via an environment variable and it is not in the
list of built-in backends, attempt to load it at
runtime.

runtime-loaded backends get a new gbm_backend_desc
struct instance for each device using them (A
small increase in memory usage to eliminate the
need for the locking and bookkeeping sharing them
would require), so these structures need to be
freed when destroying devices using runtime-loaded
backends.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
src/gbm/main/backend.c
src/gbm/main/gbm_abi_check.c
src/gbm/main/gbm_backend_abi.h