From: Rob Herring Date: Wed, 4 May 2016 02:02:41 +0000 (-0500) Subject: gbm: add Android gallium_dri.so library loading support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64a005e3eef2e12b11b2837dc7253020bb5c0e60;p=mesa.git gbm: add Android gallium_dri.so library loading support GBM needs the same special gallium_dri.so loading as EGL for Android, so copy over the same hunk from the EGL code. Signed-off-by: Rob Herring Reviewed-by: Emil Velikov Reviewed-by: Eric Anholt --- diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 236f2ae979b..0625422aaf3 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -341,6 +341,15 @@ dri_open_driver(struct gbm_dri_device *dri) /* not need continue to loop all paths once the driver is found */ if (dri->driver != NULL) break; + +#ifdef ANDROID + snprintf(path, sizeof path, "%.*s/gallium_dri.so", len, p); + dri->driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL); + if (dri->driver == NULL) + sprintf("failed to open %s: %s\n", path, dlerror()); + else + break; +#endif } if (dri->driver == NULL) {