[Mesa-dev] [PATCH v2 3/9] gbm: add Android gallium_dri.so library loading support
Rob Herring
robh at kernel.org
Wed May 4 02:02:41 UTC 2016
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 <robh at kernel.org>
---
v2:
- new patch, moved from Android build support
src/gbm/backends/dri/gbm_dri.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index 236f2ae..0625422 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) {
--
2.7.4
More information about the mesa-dev
mailing list