summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac12
-rw-r--r--freedreno/Makefile.am3
-rw-r--r--freedreno/Makefile.sources16
-rw-r--r--freedreno/freedreno_device.c10
4 files changed, 29 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index c88a1c51..0412d5b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,6 +98,11 @@ AC_ARG_ENABLE(freedreno-experimental-api,
[Enable support for freedreno's experimental API (default: disabled)]),
[FREEDRENO=$enableval], [FREEDRENO=no])
+AC_ARG_ENABLE(freedreno-kgsl,
+ AS_HELP_STRING([--enable-freedreno-kgsl],
+ [Enable support for freedreno's to use downstream android kernel API (default: disabled)]),
+ [FREEDRENO_KGSL=$enableval], [FREEDRENO_KGSL=no])
+
AC_ARG_ENABLE(tegra-experimental-api,
AS_HELP_STRING([--enable-tegra-experimental-api],
[Enable support for Tegra's experimental API (default: disabled)]),
@@ -304,6 +309,11 @@ if test "x$FREEDRENO" = xyes; then
AC_DEFINE(HAVE_FREEDRENO, 1, [Have freedreno support])
fi
+AM_CONDITIONAL(HAVE_FREEDRENO_KGSL, [test "x$FREEDRENO_KGSL" = xyes])
+if test "x$FREEDRENO_KGSL" = xyes; then
+ AC_DEFINE(HAVE_FREEDRENO_KGSL, 1, [Have freedreno support for KGSL kernel interface])
+fi
+
AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" = xyes])
if test "x$RADEON" = xyes; then
AC_DEFINE(HAVE_RADEON, 1, [Have radeon support])
@@ -438,6 +448,6 @@ echo " Radeon API $RADEON"
echo " Nouveau API $NOUVEAU"
echo " OMAP API $OMAP"
echo " EXYNOS API $EXYNOS"
-echo " Freedreno API $FREEDRENO"
+echo " Freedreno API $FREEDRENO (kgsl: $FREEDRENO_KGSL)"
echo " Tegra API $TEGRA"
echo ""
diff --git a/freedreno/Makefile.am b/freedreno/Makefile.am
index 4818431a..4482afe2 100644
--- a/freedreno/Makefile.am
+++ b/freedreno/Makefile.am
@@ -15,6 +15,9 @@ libdrm_freedreno_la_LDFLAGS = -version-number 1:0:0 -no-undefined
libdrm_freedreno_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
libdrm_freedreno_la_SOURCES = $(LIBDRM_FREEDRENO_FILES)
+if HAVE_FREEDRENO_KGSL
+libdrm_freedreno_la_SOURCES += $(LIBDRM_FREEDRENO_KGSL_FILES)
+endif
libdrm_freedrenocommonincludedir = ${includedir}/freedreno
libdrm_freedrenocommoninclude_HEADERS = $(LIBDRM_FREEDRENO_H_FILES)
diff --git a/freedreno/Makefile.sources b/freedreno/Makefile.sources
index 91020dff..c8c0244f 100644
--- a/freedreno/Makefile.sources
+++ b/freedreno/Makefile.sources
@@ -4,13 +4,6 @@ LIBDRM_FREEDRENO_FILES := \
freedreno_priv.h \
freedreno_ringbuffer.c \
freedreno_bo.c \
- kgsl/kgsl_bo.c \
- kgsl/kgsl_device.c \
- kgsl/kgsl_drm.h \
- kgsl/kgsl_pipe.c \
- kgsl/kgsl_priv.h \
- kgsl/kgsl_ringbuffer.c \
- kgsl/msm_kgsl.h \
msm/msm_bo.c \
msm/msm_device.c \
msm/msm_drm.h \
@@ -19,6 +12,15 @@ LIBDRM_FREEDRENO_FILES := \
msm/msm_ringbuffer.c \
list.h
+LIBDRM_FREEDRENO_KGSL_FILES := \
+ kgsl/kgsl_bo.c \
+ kgsl/kgsl_device.c \
+ kgsl/kgsl_drm.h \
+ kgsl/kgsl_pipe.c \
+ kgsl/kgsl_priv.h \
+ kgsl/kgsl_ringbuffer.c \
+ kgsl/msm_kgsl.h
+
LIBDRM_FREEDRENO_H_FILES := \
freedreno_drmif.h \
freedreno_ringbuffer.h
diff --git a/freedreno/freedreno_device.c b/freedreno/freedreno_device.c
index 09bc5e97..e8b5f60f 100644
--- a/freedreno/freedreno_device.c
+++ b/freedreno/freedreno_device.c
@@ -92,12 +92,14 @@ drm_public struct fd_device * fd_device_new(int fd)
return NULL;
}
- if (!strcmp(version->name, "kgsl")) {
- DEBUG_MSG("kgsl DRM device");
- dev = kgsl_device_new(fd);
- } else if (!strcmp(version->name, "msm")) {
+ if (!strcmp(version->name, "msm")) {
DEBUG_MSG("msm DRM device");
dev = msm_device_new(fd);
+#ifdef HAVE_FREEDRENO_KGSL
+ } else if (!strcmp(version->name, "kgsl")) {
+ DEBUG_MSG("kgsl DRM device");
+ dev = kgsl_device_new(fd);
+#endif
} else {
ERROR_MSG("unknown device: %s", version->name);
dev = NULL;