always define HAVE_FREEDRENO_KGSL
authorEric Engestrom <eric.engestrom@imgtec.com>
Fri, 26 Jan 2018 15:19:03 +0000 (15:19 +0000)
committerEric Engestrom <eric.engestrom@imgtec.com>
Mon, 29 Jan 2018 15:41:52 +0000 (15:41 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
configure.ac
freedreno/freedreno_bo.c
freedreno/freedreno_device.c
meson.build

index 32ceba6..e19fdc9 100644 (file)
@@ -395,6 +395,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])
index 7f8ea59..df35c36 100644 (file)
@@ -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;
index 12b95fd..a0334bf 100644 (file)
@@ -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);
index 7298f74..c7245dd 100644 (file)
@@ -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)