summaryrefslogtreecommitdiffstats
path: root/gralloc_drm_pipe.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-08-01 20:02:02 +0100
committerChih-Wei Huang <cwhuang@linux.org.tw>2015-01-16 20:22:22 +0800
commitc46b2ee2cace20f67b0c5e1121e1973a7678fd60 (patch)
treee2c5397b180e13befbf514c90ea2b2554ba6032d /gralloc_drm_pipe.c
parent00ba5a9ddd04b44cebf2bbd6014da57f06413d5e (diff)
downloadexternal_drm_gralloc-c46b2ee2cace20f67b0c5e1121e1973a7678fd60.zip
external_drm_gralloc-c46b2ee2cace20f67b0c5e1121e1973a7678fd60.tar.gz
external_drm_gralloc-c46b2ee2cace20f67b0c5e1121e1973a7678fd60.tar.bz2
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 <emil.l.velikov@gmail.com>
Diffstat (limited to 'gralloc_drm_pipe.c')
-rw-r--r--gralloc_drm_pipe.c10
1 files changed, 10 insertions, 0 deletions
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)