minigbm: Add external driver support
Allow backends with custom DRM probing logic or backends that does not rely on DRM (dma-heap, ION). Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Change-Id: I7bcaf10205ca051eb109d6e220b8a2af38267442
This commit is contained in:
parent
710cfdaae9
commit
37858e5143
2 changed files with 24 additions and 1 deletions
12
drv.c
12
drv.c
|
|
@ -28,6 +28,17 @@
|
|||
#include "drv_priv.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifdef DRV_EXTERNAL
|
||||
extern struct backend *init_external_backend();
|
||||
|
||||
void drv_preload(bool load) {};
|
||||
|
||||
static const struct backend *drv_get_backend(int fd)
|
||||
{
|
||||
return init_external_backend();
|
||||
}
|
||||
#else
|
||||
|
||||
#ifdef DRV_AMDGPU
|
||||
extern const struct backend backend_amdgpu;
|
||||
#endif
|
||||
|
|
@ -114,6 +125,7 @@ static const struct backend *drv_get_backend(int fd)
|
|||
drmFreeVersion(drm_version);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct driver *drv_create(int fd)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue