summaryrefslogtreecommitdiff
path: root/freedreno
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2015-01-13 10:53:42 -0500
committerRob Clark <robclark@freedesktop.org>2015-01-18 13:18:33 -0500
commit28662b77ee0631af8ac659f1c9cba82f94182e0c (patch)
treeb432e2262bee4aed149190f0255f06bbb6e6ec4a /freedreno
parent13fcc697ee194060f949449bf37491d8abd7119b (diff)
configure/freedreno: make KGSL support optional
libdrm_freedreno currently supports two backends, 'msm' for the upstream drm/msm driver, and 'kgsl' which supports (to some extent), the android/ downstream kgsl driver plus a sort of drm shim nonsense to get flink names. However, kgsl support is strictly on a best-effort basis. Different android devices with different versions of kgsl may have different abi's. And the existing kgsl interface (at least the parts of it that we use) is completely broken for 64bit. Lets disable it by default lest anyone actually try to use it. Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'freedreno')
-rw-r--r--freedreno/Makefile.am3
-rw-r--r--freedreno/Makefile.sources16
-rw-r--r--freedreno/freedreno_device.c10
3 files changed, 18 insertions, 11 deletions
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;