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@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/* 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) {