Commit 64a005e3 authored by Rob Herring's avatar Rob Herring Committed by Emil Velikov

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's avatarRob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov's avatarEmil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
parent 7d79eec4
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment