drm: Branch 'master' - 18 commits

[email protected] (Eric Engestr??m) Mon, 29 Jan 2018 16:13:17 +0000 (UTC)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 amdgpu/amdgpu_cs.c                |    2 +-
 configure.ac                      |   37 ++++++++++++++++++++-----------------
 freedreno/freedreno_bo.c          |    2 +-
 freedreno/freedreno_device.c      |    2 +-
 freedreno/freedreno_priv.h        |    2 +-
 intel/intel_bufmgr_gem.c          |    4 ++--
 libkms/linux.c                    |   10 +++++-----
 meson.build                       |   34 ++++++++++++++--------------------
 tests/amdgpu/amdgpu_test.c        |    1 -
 tests/amdgpu/basic_tests.c        |    6 +++---
 tests/amdgpu/cs_tests.c           |    2 +-
 tests/amdgpu/deadlock_tests.c     |    3 +--
 tests/amdgpu/uvd_enc_tests.c      |    5 +----
 tests/amdgpu/vcn_tests.c          |    2 +-
 tests/amdgpu/vm_tests.c           |    4 +---
 tests/etnaviv/write_bmp.c         |    4 +---
 tests/exynos/exynos_fimg2d_test.c |    2 +-
 tests/modeprint/modeprint.c       |    2 +-
 tests/util/pattern.c              |   15 +++++++--------
 19 files changed, 63 insertions(+), 76 deletions(-)

New commits:
commit 5457e0082df2516ee20f2f08370eb063675e4de3
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 16:23:01 2018 +0000

    meson: sort HAVE_* defines
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/meson.build b/meson.build
index 76a081a9..65366eee 100644
--- a/meson.build
+++ b/meson.build
@@ -251,14 +251,17 @@ if cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));'
   config.set10('HAVE_VISIBILITY', true)
 endif
 
-foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
-             [with_nouveau, 'NOUVEAU'],
+foreach t : [
              [with_exynos, 'EXYNOS'],
-             [with_vc4, 'VC4'],
              [with_freedreno_kgsl, 'FREEDRENO_KGSL'],
+             [with_intel, 'INTEL'],
+             [with_nouveau, 'NOUVEAU'],
+             [with_radeon, 'RADEON'],
+             [with_vc4, 'VC4'],
+             [with_vmwgfx, 'VMWGFX'],
              [dep_cairo.found(), 'CAIRO'],
              [dep_valgrind.found(), 'VALGRIND'],
-             [with_radeon, 'RADEON']]
+            ]
   config.set10('HAVE_@0@'.format(t[1]), t[0])
 endforeach
 if with_freedreno_kgsl and not with_freedreno
commit 1d7bbf852094481a8f514ed786b7a7a8af67e5fe
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 15:08:39 2018 +0000

    always define HAVE_VALGRIND
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/configure.ac b/configure.ac
index 993c2a27..a0246fe5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -509,6 +509,8 @@ if test "x$VALGRIND" = "xyes"; then
 		AC_MSG_ERROR([Valgrind support required but not present])
 	fi
 	AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings])
+else
+	AC_DEFINE([HAVE_VALGRIND], 0)
 fi
 
 AC_MSG_RESULT([$VALGRIND])
diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h
index 199ccb94..81ad6092 100644
--- a/freedreno/freedreno_priv.h
+++ b/freedreno/freedreno_priv.h
@@ -200,7 +200,7 @@ offset_bytes(void *end, void *start)
 	return ((char *)end) - ((char *)start);
 }
 
-#ifdef HAVE_VALGRIND
+#if HAVE_VALGRIND
 #  include <memcheck.h>
 
 /*
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 71f140f5..386da30e 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -66,7 +66,7 @@
 #include "i915_drm.h"
 #include "uthash.h"
 
-#ifdef HAVE_VALGRIND
+#if HAVE_VALGRIND
 #include <valgrind.h>
 #include <memcheck.h>
 #define VG(x) x
@@ -1629,7 +1629,7 @@ int
 drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
-#ifdef HAVE_VALGRIND
+#if HAVE_VALGRIND
 	drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
 #endif
 	int ret;
diff --git a/meson.build b/meson.build
index 15a1d405..76a081a9 100644
--- a/meson.build
+++ b/meson.build
@@ -257,16 +257,13 @@ foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
              [with_vc4, 'VC4'],
              [with_freedreno_kgsl, 'FREEDRENO_KGSL'],
              [dep_cairo.found(), 'CAIRO'],
+             [dep_valgrind.found(), 'VALGRIND'],
              [with_radeon, 'RADEON']]
   config.set10('HAVE_@0@'.format(t[1]), t[0])
 endforeach
 if with_freedreno_kgsl and not with_freedreno
   error('cannot enable freedreno-kgsl without freedreno support')
 endif
-if dep_valgrind.found()
-  config.set10('HAVE_VALGRIND', true)
-endif
-
 config.set10('_GNU_SOURCE', true)
 config_file = configure_file(
   configuration : config,
commit d2b0a4ec70d93040159af0cbc15717d35812ffc5
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 15:15:29 2018 +0000

    always define HAVE_CAIRO
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/configure.ac b/configure.ac
index e19fdc99..993c2a27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -466,6 +466,8 @@ if test "x$CAIRO" = xyes; then
 		AC_MSG_ERROR([Cairo support required but not present])
 	fi
 	AC_DEFINE(HAVE_CAIRO, 1, [Have Cairo support])
+else
+	AC_DEFINE(HAVE_CAIRO, 0)
 fi
 AC_MSG_RESULT([$CAIRO])
 AM_CONDITIONAL(HAVE_CAIRO, [test "x$CAIRO" = xyes])
diff --git a/meson.build b/meson.build
index c7245dda..15a1d405 100644
--- a/meson.build
+++ b/meson.build
@@ -256,15 +256,13 @@ foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
              [with_exynos, 'EXYNOS'],
              [with_vc4, 'VC4'],
              [with_freedreno_kgsl, 'FREEDRENO_KGSL'],
+             [dep_cairo.found(), 'CAIRO'],
              [with_radeon, 'RADEON']]
   config.set10('HAVE_@0@'.format(t[1]), t[0])
 endforeach
 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)
-endif
 if dep_valgrind.found()
   config.set10('HAVE_VALGRIND', true)
 endif
diff --git a/tests/util/pattern.c b/tests/util/pattern.c
index 2366b006..75a458d4 100644
--- a/tests/util/pattern.c
+++ b/tests/util/pattern.c
@@ -34,7 +34,7 @@
 
 #include <drm_fourcc.h>
 
-#ifdef HAVE_CAIRO
+#if HAVE_CAIRO
 #include <cairo.h>
 #include <math.h>
 #endif
@@ -546,7 +546,7 @@ static void fill_smpte(const struct util_format_info *info, void *planes[3],
 static void make_pwetty(void *data, unsigned int width, unsigned int height,
 			unsigned int stride, uint32_t format)
 {
-#ifdef HAVE_CAIRO
+#if HAVE_CAIRO
 	cairo_surface_t *surface;
 	cairo_t *cr;
 	cairo_format_t cairo_format;
commit ec53f4808c8ccd73cd2dbed8b53a4e961e3a2b76
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 15:19:03 2018 +0000

    always define HAVE_FREEDRENO_KGSL
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

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)
commit ee47329bef727a109418f7134638e0fe67210748
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 16:21:30 2018 +0000

    meson,configure: always define HAVE_{INTEL,VMWGFX,NOUVEAU,EXYNOS,VC4,RADEON}
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/configure.ac b/configure.ac
index 6bb8d9f5..32ceba69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -358,16 +358,22 @@ AM_CONDITIONAL(HAVE_LIBKMS, [test "x$LIBKMS" = xyes])
 AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes])
 if test "x$INTEL" = xyes; then
 	AC_DEFINE(HAVE_INTEL, 1, [Have intel support])
+else
+	AC_DEFINE(HAVE_INTEL, 0)
 fi
 
 AM_CONDITIONAL(HAVE_VMWGFX, [test "x$VMWGFX" = xyes])
 if test "x$VMWGFX" = xyes; then
 	AC_DEFINE(HAVE_VMWGFX, 1, [Have vmwgfx kernel headers])
+else
+	AC_DEFINE(HAVE_VMWGFX, 0)
 fi
 
 AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes])
 if test "x$NOUVEAU" = xyes; then
 	AC_DEFINE(HAVE_NOUVEAU, 1, [Have nouveau (nvidia) support])
+else
+	AC_DEFINE(HAVE_NOUVEAU, 0)
 fi
 
 AM_CONDITIONAL(HAVE_OMAP, [test "x$OMAP" = xyes])
@@ -375,6 +381,8 @@ AM_CONDITIONAL(HAVE_OMAP, [test "x$OMAP" = xyes])
 AM_CONDITIONAL(HAVE_EXYNOS, [test "x$EXYNOS" = xyes])
 if test "x$EXYNOS" = xyes; then
 	AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support])
+else
+	AC_DEFINE(HAVE_EXYNOS, 0)
 fi
 
 AM_CONDITIONAL(HAVE_FREEDRENO, [test "x$FREEDRENO" = xyes])
@@ -392,6 +400,8 @@ fi
 AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" = xyes])
 if test "x$RADEON" = xyes; then
 	AC_DEFINE(HAVE_RADEON, 1, [Have radeon support])
+else
+	AC_DEFINE(HAVE_RADEON, 0)
 fi
 
 if test "x$AMDGPU" != xno; then
@@ -421,6 +431,8 @@ if test "x$AMDGPU" = xyes; then
 	if test "x$have_cunit" = "xno"; then
 		AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
 	fi
+else
+	AC_DEFINE(HAVE_AMDGPU, 0)
 fi
 
 AM_CONDITIONAL(HAVE_TEGRA, [test "x$TEGRA" = xyes])
@@ -428,6 +440,8 @@ AM_CONDITIONAL(HAVE_TEGRA, [test "x$TEGRA" = xyes])
 AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes])
 if test "x$VC4" = xyes; then
 	AC_DEFINE(HAVE_VC4, 1, [Have VC4 support])
+else
+	AC_DEFINE(HAVE_VC4, 0)
 fi
 
 AM_CONDITIONAL(HAVE_ETNAVIV, [test "x$ETNAVIV" = xyes])
diff --git a/libkms/linux.c b/libkms/linux.c
index 0b50777e..1431eb10 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -110,27 +110,27 @@ linux_from_sysfs(int fd, struct kms_driver **out)
 	if (ret)
 		return ret;
 
-#ifdef HAVE_INTEL
+#if HAVE_INTEL
 	if (!strcmp(name, "intel"))
 		ret = intel_create(fd, out);
 	else
 #endif
-#ifdef HAVE_VMWGFX
+#if HAVE_VMWGFX
 	if (!strcmp(name, "vmwgfx"))
 		ret = vmwgfx_create(fd, out);
 	else
 #endif
-#ifdef HAVE_NOUVEAU
+#if HAVE_NOUVEAU
 	if (!strcmp(name, "nouveau"))
 		ret = nouveau_create(fd, out);
 	else
 #endif
-#ifdef HAVE_RADEON
+#if HAVE_RADEON
 	if (!strcmp(name, "radeon"))
 		ret = radeon_create(fd, out);
 	else
 #endif
-#ifdef HAVE_EXYNOS
+#if HAVE_EXYNOS
 	if (!strcmp(name, "exynos"))
 		ret = exynos_create(fd, out);
 	else
diff --git a/meson.build b/meson.build
index fa00254b..7298f741 100644
--- a/meson.build
+++ b/meson.build
@@ -256,9 +256,7 @@ foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
              [with_exynos, 'EXYNOS'],
              [with_vc4, 'VC4'],
              [with_radeon, 'RADEON']]
-  if t[0]
-    config.set10('HAVE_@0@'.format(t[1]), true)
-  endif
+  config.set10('HAVE_@0@'.format(t[1]), t[0])
 endforeach
 if with_freedreno_kgsl
   if not with_freedreno
commit 540827cc7da2228ae54947adcbf33555a48d0b1c
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 16:19:23 2018 +0000

    meson,configure: remove unused HAVE_ETNAVIV define
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/configure.ac b/configure.ac
index 83f2e4c2..6bb8d9f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -431,9 +431,6 @@ if test "x$VC4" = xyes; then
 fi
 
 AM_CONDITIONAL(HAVE_ETNAVIV, [test "x$ETNAVIV" = xyes])
-if test "x$ETNAVIV" = xyes; then
-	AC_DEFINE(HAVE_ETNAVIV, 1, [Have etnaviv support])
-fi
 
 AM_CONDITIONAL(HAVE_INSTALL_TESTS, [test "x$INSTALL_TESTS" = xyes])
 
diff --git a/meson.build b/meson.build
index 049ef3c3..fa00254b 100644
--- a/meson.build
+++ b/meson.build
@@ -255,7 +255,7 @@ foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
              [with_nouveau, 'NOUVEAU'],
              [with_exynos, 'EXYNOS'],
              [with_vc4, 'VC4'],
-             [with_etnaviv, 'ETNAVIV'], [with_radeon, 'RADEON']]
+             [with_radeon, 'RADEON']]
   if t[0]
     config.set10('HAVE_@0@'.format(t[1]), true)
   endif
commit 2cd9105db60714c4c9f9e89625da920b4940455f
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 16:17:53 2018 +0000

    meson,configure: remove unused HAVE_FREEDRENO define
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/configure.ac b/configure.ac
index c12f8b54..83f2e4c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -378,9 +378,6 @@ if test "x$EXYNOS" = xyes; then
 fi
 
 AM_CONDITIONAL(HAVE_FREEDRENO, [test "x$FREEDRENO" = xyes])
-if test "x$FREEDRENO" = xyes; then
-	AC_DEFINE(HAVE_FREEDRENO, 1, [Have freedreno support])
-fi
 
 if test "x$FREEDRENO_KGSL" = xyes; then
 	if test "x$FREEDRENO" != xyes; then
diff --git a/meson.build b/meson.build
index fc70c4f4..049ef3c3 100644
--- a/meson.build
+++ b/meson.build
@@ -253,7 +253,7 @@ endif
 
 foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
              [with_nouveau, 'NOUVEAU'],
-             [with_exynos, 'EXYNOS'], [with_freedreno, 'FREEDRENO'],
+             [with_exynos, 'EXYNOS'],
              [with_vc4, 'VC4'],
              [with_etnaviv, 'ETNAVIV'], [with_radeon, 'RADEON']]
   if t[0]
commit 052ef66f06ae10f49129020137e6cadf3298c540
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 16:16:13 2018 +0000

    meson,configure: remove unused HAVE_TEGRA define
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/configure.ac b/configure.ac
index 11e94e13..c12f8b54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -427,9 +427,6 @@ if test "x$AMDGPU" = xyes; then
 fi
 
 AM_CONDITIONAL(HAVE_TEGRA, [test "x$TEGRA" = xyes])
-if test "x$TEGRA" = xyes; then
-	AC_DEFINE(HAVE_TEGRA, 1, [Have Tegra support])
-fi
 
 AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes])
 if test "x$VC4" = xyes; then
diff --git a/meson.build b/meson.build
index 4310bdf2..fc70c4f4 100644
--- a/meson.build
+++ b/meson.build
@@ -254,7 +254,7 @@ endif
 foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
              [with_nouveau, 'NOUVEAU'],
              [with_exynos, 'EXYNOS'], [with_freedreno, 'FREEDRENO'],
-             [with_tegra, 'TEGRA'], [with_vc4, 'VC4'],
+             [with_vc4, 'VC4'],
              [with_etnaviv, 'ETNAVIV'], [with_radeon, 'RADEON']]
   if t[0]
     config.set10('HAVE_@0@'.format(t[1]), true)
commit de9be0bebf242a6ceb5ad41a714a9d0306c6f4f1
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 16:10:04 2018 +0000

    meson,configure: remove unused HAVE_OMAP define
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/configure.ac b/configure.ac
index 7f114a73..11e94e13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -371,9 +371,6 @@ if test "x$NOUVEAU" = xyes; then
 fi
 
 AM_CONDITIONAL(HAVE_OMAP, [test "x$OMAP" = xyes])
-if test "x$OMAP" = xyes; then
-	AC_DEFINE(HAVE_OMAP, 1, [Have OMAP support])
-fi
 
 AM_CONDITIONAL(HAVE_EXYNOS, [test "x$EXYNOS" = xyes])
 if test "x$EXYNOS" = xyes; then
diff --git a/meson.build b/meson.build
index 6bd528a6..4310bdf2 100644
--- a/meson.build
+++ b/meson.build
@@ -252,7 +252,7 @@ if cc.compiles('''int foo_hidden(void) __attribute__((visibility(("hidden"))));'
 endif
 
 foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
-             [with_nouveau, 'NOUVEAU'], [with_omap, 'OMAP'],
+             [with_nouveau, 'NOUVEAU'],
              [with_exynos, 'EXYNOS'], [with_freedreno, 'FREEDRENO'],
              [with_tegra, 'TEGRA'], [with_vc4, 'VC4'],
              [with_etnaviv, 'ETNAVIV'], [with_radeon, 'RADEON']]
commit c56db628c77ecc734bfa00d773cc1717c8c1f825
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 16:05:45 2018 +0000

    configure: remove unused HAVE_INSTALL_TESTS define
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/configure.ac b/configure.ac
index 1ea36020..7f114a73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -445,9 +445,6 @@ if test "x$ETNAVIV" = xyes; then
 fi
 
 AM_CONDITIONAL(HAVE_INSTALL_TESTS, [test "x$INSTALL_TESTS" = xyes])
-if test "x$INSTALL_TESTS" = xyes; then
-	AC_DEFINE(HAVE_INSTALL_TESTS, 1, [Install test programs])
-fi
 
 AC_ARG_ENABLE([cairo-tests],
               [AS_HELP_STRING([--enable-cairo-tests],
commit a7434d3618c5a1a3d3006fdb158acd86a5d9380e
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 16:05:03 2018 +0000

    configure: remove unused HAVE_CUNIT define
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/configure.ac b/configure.ac
index 35378b33..1ea36020 100644
--- a/configure.ac
+++ b/configure.ac
@@ -424,8 +424,6 @@ AM_CONDITIONAL(HAVE_AMDGPU, [test "x$AMDGPU" = xyes])
 if test "x$AMDGPU" = xyes; then
 	AC_DEFINE(HAVE_AMDGPU, 1, [Have amdgpu support])
 
-	AC_DEFINE(HAVE_CUNIT, [test "x$have_cunit" != "xno"], [Enable CUNIT Have amdgpu support])
-
 	if test "x$have_cunit" = "xno"; then
 		AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
 	fi
commit 52689eebeb060df52fbca4009a076961cdf78edb
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 15:34:03 2018 +0000

    meson: add missing HAVE_RADEON
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>
    Reviewed-by: Dylan Baker <[email protected]>

diff --git a/meson.build b/meson.build
index d7a50cf9..6bd528a6 100644
--- a/meson.build
+++ b/meson.build
@@ -255,7 +255,7 @@ foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
              [with_nouveau, 'NOUVEAU'], [with_omap, 'OMAP'],
              [with_exynos, 'EXYNOS'], [with_freedreno, 'FREEDRENO'],
              [with_tegra, 'TEGRA'], [with_vc4, 'VC4'],
-             [with_etnaviv, 'ETNAVIV']]
+             [with_etnaviv, 'ETNAVIV'], [with_radeon, 'RADEON']]
   if t[0]
     config.set10('HAVE_@0@'.format(t[1]), true)
   endif
commit 44867b0eefcd8f14923bc8849bcb38f445f9120e
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 11:03:32 2018 +0000

    tests/etnaviv: drop unused `return 0`
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/tests/etnaviv/write_bmp.c b/tests/etnaviv/write_bmp.c
index 7ae0646c..f7b6bc69 100644
--- a/tests/etnaviv/write_bmp.c
+++ b/tests/etnaviv/write_bmp.c
@@ -63,7 +63,7 @@ struct dib_header {
 	unsigned int unused[12];
 } __attribute__((__packed__));
 
-static int
+static void
 bmp_header_write(int fd, int width, int height, int bgra, int noflip, int alpha)
 {
 	struct bmp_header bmp_header = {
@@ -98,8 +98,6 @@ bmp_header_write(int fd, int width, int height, int bgra, int noflip, int alpha)
 
 	write(fd, &bmp_header, sizeof(struct bmp_header));
 	write(fd, &dib_header, sizeof(struct dib_header));
-
-	return 0;
 }
 
 void
commit 28052ad589babf12938acc89d349c8b356e838aa
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 11:05:09 2018 +0000

    tests/util: drop unused parameters
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/tests/util/pattern.c b/tests/util/pattern.c
index 095eadf2..2366b006 100644
--- a/tests/util/pattern.c
+++ b/tests/util/pattern.c
@@ -823,8 +823,8 @@ static void fill_tiles(const struct util_format_info *info, void *planes[3],
 	}
 }
 
-static void fill_plain(const struct util_format_info *info, void *planes[3],
-		       unsigned int width, unsigned int height,
+static void fill_plain(void *planes[3],
+		       unsigned int height,
 		       unsigned int stride)
 {
 	memset(planes[0], 0x77, stride * height);
@@ -860,7 +860,7 @@ void util_fill_pattern(uint32_t format, enum util_fill_pattern pattern,
 		return fill_smpte(info, planes, width, height, stride);
 
 	case UTIL_PATTERN_PLAIN:
-		return fill_plain(info, planes, width, height, stride);
+		return fill_plain(planes, height, stride);
 
 	default:
 		printf("Error: unsupported test pattern %u.\n", pattern);
commit 256cdc02a89a6ad51f9ba7bebc6d1ade20f8bfa8
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 11:05:28 2018 +0000

    tests/util: fix signed/unsigned comparisons
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/tests/util/pattern.c b/tests/util/pattern.c
index 00b08a8c..095eadf2 100644
--- a/tests/util/pattern.c
+++ b/tests/util/pattern.c
@@ -549,7 +549,6 @@ static void make_pwetty(void *data, unsigned int width, unsigned int height,
 #ifdef HAVE_CAIRO
 	cairo_surface_t *surface;
 	cairo_t *cr;
-	int x, y;
 	cairo_format_t cairo_format;
 
 	/* we can ignore the order of R,G,B channels */
@@ -576,8 +575,8 @@ static void make_pwetty(void *data, unsigned int width, unsigned int height,
 	cairo_surface_destroy(surface);
 
 	cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE);
-	for (x = 0; x < width; x += 250)
-		for (y = 0; y < height; y += 250) {
+	for (unsigned x = 0; x < width; x += 250)
+		for (unsigned y = 0; y < height; y += 250) {
 			char buf[64];
 
 			cairo_move_to(cr, x, y - 20);
commit 80f33f4529710f5a24583ab5189d00cc7cb0d62b
Author: Eric Engestrom <[email protected]>
Date:   Thu Jan 25 11:24:03 2018 +0000

    tests/amdgpu: drop unused variables
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/tests/amdgpu/amdgpu_test.c b/tests/amdgpu/amdgpu_test.c
index cbeb1ee8..4f766aaf 100644
--- a/tests/amdgpu/amdgpu_test.c
+++ b/tests/amdgpu/amdgpu_test.c
@@ -243,7 +243,6 @@ static const char options[]   = "hlrps:t:b:d:f";
 static int amdgpu_open_devices(int open_render_node)
 {
 	drmDevicePtr devices[MAX_CARDS_SUPPORTED];
-	int ret;
 	int i;
 	int drm_node;
 	int amd_index = 0;
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
index 6ee0aa3b..354b0157 100644
--- a/tests/amdgpu/basic_tests.c
+++ b/tests/amdgpu/basic_tests.c
@@ -681,7 +681,7 @@ static void amdgpu_command_submission_compute_nop(void)
 	struct amdgpu_cs_fence fence_status;
 	uint32_t *ptr;
 	uint32_t expired;
-	int i, r, instance;
+	int r, instance;
 	amdgpu_bo_list_handle bo_list;
 	amdgpu_va_handle va_handle;
 	struct drm_amdgpu_info_hw_ip info;
@@ -1473,7 +1473,7 @@ static void amdgpu_sync_dependency_test(void)
 	struct amdgpu_cs_ib_info ib_info;
 	struct amdgpu_cs_fence fence_status;
 	uint32_t expired;
-	int i, j, r, instance;
+	int i, j, r;
 	amdgpu_bo_list_handle bo_list;
 	amdgpu_va_handle va_handle;
 	static uint32_t *ptr;
diff --git a/tests/amdgpu/cs_tests.c b/tests/amdgpu/cs_tests.c
index 4880b74f..a5361cd5 100644
--- a/tests/amdgpu/cs_tests.c
+++ b/tests/amdgpu/cs_tests.c
@@ -273,7 +273,7 @@ static void amdgpu_cs_uvd_create(void)
 
 static void amdgpu_cs_uvd_decode(void)
 {
-	const unsigned dpb_size = 15923584, ctx_size = 5287680, dt_size = 737280;
+	const unsigned dpb_size = 15923584, dt_size = 737280;
 	uint64_t msg_addr, fb_addr, bs_addr, dpb_addr, ctx_addr, dt_addr, it_addr;
 	struct amdgpu_bo_alloc_request req = {0};
 	amdgpu_bo_handle buf_handle;
diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c
index aaeea871..96c99c96 100644
--- a/tests/amdgpu/deadlock_tests.c
+++ b/tests/amdgpu/deadlock_tests.c
@@ -110,7 +110,6 @@ CU_BOOL suite_deadlock_tests_enable(void)
 
 int suite_deadlock_tests_init(void)
 {
-	struct amdgpu_gpu_info gpu_info = {0};
 	int r;
 
 	r = amdgpu_device_initialize(drm_amdgpu[0], &major_version,
@@ -177,7 +176,7 @@ static void amdgpu_deadlock_helper(unsigned ip_type)
 	struct amdgpu_cs_ib_info ib_info;
 	struct amdgpu_cs_fence fence_status;
 	uint32_t expired;
-	int i, r, instance;
+	int i, r;
 	amdgpu_bo_list_handle bo_list;
 	amdgpu_va_handle va_handle;
 
diff --git a/tests/amdgpu/uvd_enc_tests.c b/tests/amdgpu/uvd_enc_tests.c
index bed8494a..0377c1a5 100644
--- a/tests/amdgpu/uvd_enc_tests.c
+++ b/tests/amdgpu/uvd_enc_tests.c
@@ -247,8 +247,6 @@ static void free_resource(struct amdgpu_uvd_enc_bo *uvd_enc_bo)
 
 static void amdgpu_cs_uvd_enc_create(void)
 {
-	int len, r;
-
 	enc.width = 160;
 	enc.height = 128;
 
@@ -263,7 +261,7 @@ static void check_result(struct amdgpu_uvd_enc *enc)
 	uint64_t sum;
 	uint32_t s = 175602;
 	uint32_t *ptr, size;
-	int i, j, r;
+	int j, r;
 
 	r = amdgpu_bo_cpu_map(enc->fb.handle, (void **)&enc->fb.ptr);
 	CU_ASSERT_EQUAL(r, 0);
@@ -470,7 +468,6 @@ static void amdgpu_cs_uvd_enc_encode(void)
 
 static void amdgpu_cs_uvd_enc_destroy(void)
 {
-	struct amdgpu_uvd_enc_bo sw_ctx;
 	int len, r;
 
 	num_resources  = 0;
diff --git a/tests/amdgpu/vcn_tests.c b/tests/amdgpu/vcn_tests.c
index 9224bc37..2eb8c434 100644
--- a/tests/amdgpu/vcn_tests.c
+++ b/tests/amdgpu/vcn_tests.c
@@ -283,7 +283,7 @@ static void amdgpu_cs_vcn_dec_create(void)
 
 static void amdgpu_cs_vcn_dec_decode(void)
 {
-	const unsigned dpb_size = 15923584, ctx_size = 5287680, dt_size = 737280;
+	const unsigned dpb_size = 15923584, dt_size = 737280;
 	uint64_t msg_addr, fb_addr, bs_addr, dpb_addr, ctx_addr, dt_addr, it_addr, sum;
 	struct amdgpu_vcn_bo dec_buf;
 	int size, len, i, r;
diff --git a/tests/amdgpu/vm_tests.c b/tests/amdgpu/vm_tests.c
index 4b0121ff..7b6dc5d6 100644
--- a/tests/amdgpu/vm_tests.c
+++ b/tests/amdgpu/vm_tests.c
@@ -55,7 +55,6 @@ CU_BOOL suite_vm_tests_enable(void)
 
 int suite_vm_tests_init(void)
 {
-	struct amdgpu_gpu_info gpu_info = {0};
 	int r;
 
 	r = amdgpu_device_initialize(drm_amdgpu[0], &major_version,
@@ -98,10 +97,9 @@ static void amdgpu_vmid_reserve_test(void)
 	struct amdgpu_cs_ib_info ib_info;
 	struct amdgpu_cs_fence fence_status;
 	uint32_t expired, flags;
-	int i, r, instance;
+	int i, r;
 	amdgpu_bo_list_handle bo_list;
 	amdgpu_va_handle va_handle;
-	union drm_amdgpu_vm vm;
 	static uint32_t *ptr;
 
 	r = amdgpu_cs_ctx_create(device_handle, &context_handle);
commit c6fcd176e8949148ad2e07b0ee970cd1ad287113
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 26 11:12:06 2018 +0000

    tests/amdgpu: add parentheses to make operation priority explicit
    
    While at it, align with the other half on the next line.
    
    Cc: Andrey Grodzovsky <[email protected]>
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
index 0f75e896..6ee0aa3b 100644
--- a/tests/amdgpu/basic_tests.c
+++ b/tests/amdgpu/basic_tests.c
@@ -1608,7 +1608,7 @@ static void amdgpu_sync_dependency_test(void)
 	j = i;
 	ptr[i++] = PACKET3(PACKET3_WRITE_DATA, 3);
 	ptr[i++] = WRITE_DATA_DST_SEL(5) | WR_CONFIRM;
-	ptr[i++] = 0xfffffffc & ib_result_mc_address + DATA_OFFSET * 4;
+	ptr[i++] =          0xfffffffc & (ib_result_mc_address + DATA_OFFSET * 4);
 	ptr[i++] = (0xffffffff00000000 & (ib_result_mc_address + DATA_OFFSET * 4)) >> 32;
 	ptr[i++] = 99;
 
commit 089d45456b618f78d461c6271fbdfb42ce09fc3e
Author: Eric Engestrom <[email protected]>
Date:   Fri Jan 5 15:32:14 2018 +0000

    remove unnecessary double-semicolon
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
index 987daa40..46dffe1d 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -582,7 +582,7 @@ static int amdgpu_cs_reset_sem(amdgpu_semaphore_handle sem)
 	if (!sem || !sem->signal_fence.context)
 		return -EINVAL;
 
-	sem->signal_fence.context = NULL;;
+	sem->signal_fence.context = NULL;
 	sem->signal_fence.ip_type = 0;
 	sem->signal_fence.ip_instance = 0;
 	sem->signal_fence.ring = 0;
diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c
index b71cf593..14d304d3 100644
--- a/tests/exynos/exynos_fimg2d_test.c
+++ b/tests/exynos/exynos_fimg2d_test.c
@@ -533,7 +533,7 @@ err_free_userptr:
 fail:
 	g2d_fini(ctx);
 
-	return ret;;
+	return ret;
 }
 
 #if EXYNOS_G2D_USERPTR_TEST
diff --git a/tests/modeprint/modeprint.c b/tests/modeprint/modeprint.c
index 0d854103..c81dd91d 100644
--- a/tests/modeprint/modeprint.c
+++ b/tests/modeprint/modeprint.c
@@ -244,7 +244,7 @@ static int printFrameBuffer(int fd, drmModeResPtr res, drmModeFBPtr fb)
 	printf("\thandle    : %i\n", fb->handle);
 	printf("\twidth     : %i\n", fb->width);
 	printf("\theight    : %i\n", fb->height);
-	printf("\tpitch     : %i\n", fb->pitch);;
+	printf("\tpitch     : %i\n", fb->pitch);
 	printf("\tbpp       : %i\n", fb->bpp);
 	printf("\tdepth     : %i\n", fb->depth);
 	printf("\tbuffer_id : %i\n", fb->handle);

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--
_______________________________________________
Dri-patches mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-patches