diff --git a/configure.ac b/configure.ac index 32ceba69..e19fdc99 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c index 7f8ea59c..df35c36a 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 12b95fd0..a0334bf4 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 7298f741..c7245dda 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)