From c46b2ee2cace20f67b0c5e1121e1973a7678fd60 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 1 Aug 2014 20:02:02 +0100 Subject: freedreno: completely untested initial support v2: [Emil Velikov] - drmGetVersion returns the kernel module name. - Add it to the build :) - freedreno_map returns void * while gralloc::map expects int. Signed-off-by: Emil Velikov --- gralloc_drm_pipe.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gralloc_drm_pipe.c') diff --git a/gralloc_drm_pipe.c b/gralloc_drm_pipe.c index ec3e19d..1183ba1 100644 --- a/gralloc_drm_pipe.c +++ b/gralloc_drm_pipe.c @@ -368,6 +368,8 @@ static void pipe_destroy(struct gralloc_drm_drv_t *drv) FREE(pm); } +/* for freedreno */ +#include "freedreno/drm/freedreno_drm_public.h" /* for nouveau */ #include "nouveau/drm/nouveau_drm_public.h" /* for r300 */ @@ -387,6 +389,10 @@ static int pipe_init_screen(struct pipe_manager *pm) { struct pipe_screen *screen = NULL; +#ifdef ENABLE_PIPE_FREEDRENO + if (strcmp(pm->driver, "msm")) + screen = fd_drm_screen_create(pm->fd); +#endif #ifdef ENABLE_PIPE_NOUVEAU if (strcmp(pm->driver, "nouveau") == 0) screen = nouveau_drm_screen_create(pm->fd); @@ -520,6 +526,10 @@ static int pipe_find_driver(struct pipe_manager *pm, const char *name) driver = "vmwgfx"; err = 0; } + if (strcmp(name, "msm") == 0) { + driver = "msm"; + err = 0; + } } if (!err) -- cgit v1.1