[Mesa-dev] [PATCH] gbm: remove gbm_gallium_drm from the loader

Kristian Høgsberg krh at bitplanet.net
Mon Mar 23 11:14:04 PDT 2015


On Sat, Mar 21, 2015 at 10:45 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>

Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

> ---
>
> Should have sent with the "remove st/gbm" series. Ohh well.
>
> -Emil
>
>
>  src/gbm/main/backend.c | 24 ------------------------
>  1 file changed, 24 deletions(-)
>
> diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
> index aceb662..4929d73 100644
> --- a/src/gbm/main/backend.c
> +++ b/src/gbm/main/backend.c
> @@ -30,7 +30,6 @@
>  #include <stdlib.h>
>  #include <string.h>
>  #include <limits.h>
> -#include <dlfcn.h>
>
>  #include "backend.h"
>
> @@ -45,41 +44,18 @@ struct backend_desc {
>
>  static const struct backend_desc backends[] = {
>     { "gbm_dri.so", &gbm_dri_backend },
> -   { "gbm_gallium_drm.so", NULL },
>  };
>
>  static const void *
>  load_backend(const struct backend_desc *backend)
>  {
> -   char path[PATH_MAX];
>     const void *init = NULL;
> -   void *module;
> -   const char *name;
> -   const char *entrypoint = "gbm_backend";
>
>     if (backend == NULL)
>        return NULL;
>
> -   name = backend->name;
> -
>     if (backend->builtin) {
>        init = backend->builtin;
> -   } else {
> -      if (name[0] != '/')
> -         snprintf(path, sizeof path, MODULEDIR "/%s", name);
> -      else
> -         snprintf(path, sizeof path, "%s", name);
> -
> -      module = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
> -      if (!module) {
> -         fprintf(stderr,
> -                 "failed to load module: %s\n", dlerror());
> -         return NULL;
> -      }
> -
> -      init = dlsym(module, entrypoint);
> -      if (!init)
> -         return NULL;
>     }
>
>     return init;
> --
> 2.1.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list