diff mbox

[libdrm,09/13] always define HAVE_FREEDRENO_KGSL

Message ID 20180126164552.5473-9-eric.engestrom@imgtec.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Engestrom Jan. 26, 2018, 4:45 p.m. UTC
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
 configure.ac                 | 2 ++
 freedreno/freedreno_bo.c     | 2 +-
 freedreno/freedreno_device.c | 2 +-
 meson.build                  | 8 +++-----
 4 files changed, 7 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index e09eded5884da7891862..a745d694a3bb2e8b9761 100644
--- a/configure.ac
+++ b/configure.ac
@@ -399,6 +399,8 @@  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])
+else
+	AC_DEFINE(HAVE_FREEDRENO_KGSL, 0)
 fi
 
 AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" = xyes])
diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index 7f8ea59c2a2433404f62..df35c36a2dacdd2c6fdc 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -326,7 +326,7 @@  void fd_bo_cpu_fini(struct fd_bo *bo)
 	bo->funcs->cpu_fini(bo);
 }
 
-#ifndef HAVE_FREEDRENO_KGSL
+#if !HAVE_FREEDRENO_KGSL
 struct fd_bo * fd_bo_from_fbdev(struct fd_pipe *pipe, int fbfd, uint32_t size)
 {
     return NULL;
diff --git a/freedreno/freedreno_device.c b/freedreno/freedreno_device.c
index 12b95fd0223e39b6b7f9..a0334bf4764e009f6c32 100644
--- a/freedreno/freedreno_device.c
+++ b/freedreno/freedreno_device.c
@@ -65,7 +65,7 @@  struct fd_device * fd_device_new(int fd)
 
 		dev = msm_device_new(fd);
 		dev->version = version->version_minor;
-#ifdef HAVE_FREEDRENO_KGSL
+#if HAVE_FREEDRENO_KGSL
 	} else if (!strcmp(version->name, "kgsl")) {
 		DEBUG_MSG("kgsl DRM device");
 		dev = kgsl_device_new(fd);
diff --git a/meson.build b/meson.build
index 6ed080ece9c3dff1a1e1..b7dbe07949b3957e2523 100644
--- a/meson.build
+++ b/meson.build
@@ -255,14 +255,12 @@  foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
              [with_nouveau, 'NOUVEAU'],
              [with_exynos, 'EXYNOS'],
              [with_vc4, 'VC4'],
+             [with_freedreno_kgsl, 'FREEDRENO_KGSL'],
              [with_radeon, 'RADEON']]
   config.set10('HAVE_@0@'.format(t[1]), t[0])
 endforeach
-if with_freedreno_kgsl
-  if not with_freedreno
-    error('cannot enable freedreno-kgsl without freedreno support')
-  endif
-  config.set10('HAVE_FREEDRENO_KGSL', true)
+if with_freedreno_kgsl and not with_freedreno
+  error('cannot enable freedreno-kgsl without freedreno support')
 endif
 if dep_cairo.found()
   config.set10('HAVE_CAIRO', true)