drm: Branch 'master' - 4 commits

[email protected] (Eric Engestr??m) Tue, 20 Mar 2018 18:20:27 +0000 (UTC)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 amdgpu/amdgpu_asic_id.c               |    4 ----
 amdgpu/amdgpu_bo.c                    |    4 ----
 amdgpu/amdgpu_cs.c                    |    4 ----
 amdgpu/amdgpu_device.c                |    4 ----
 amdgpu/amdgpu_gpu_info.c              |    4 ----
 amdgpu/amdgpu_internal.h              |    4 ----
 amdgpu/amdgpu_vamgr.c                 |    4 ----
 amdgpu/amdgpu_vm.c                    |    4 ----
 amdgpu/util_hash.c                    |    4 ----
 amdgpu/util_hash.h                    |    4 ----
 amdgpu/util_hash_table.c              |    4 ----
 amdgpu/util_hash_table.h              |    4 ----
 configure.ac                          |    2 ++
 etnaviv/etnaviv_bo.c                  |    4 ----
 etnaviv/etnaviv_bo_cache.c            |    4 ----
 etnaviv/etnaviv_cmd_stream.c          |    4 ----
 etnaviv/etnaviv_device.c              |    4 ----
 etnaviv/etnaviv_gpu.c                 |    4 ----
 etnaviv/etnaviv_perfmon.c             |    4 ----
 etnaviv/etnaviv_pipe.c                |    4 ----
 exynos/exynos_drm.c                   |    4 ----
 exynos/exynos_fimg2d.c                |    4 ----
 freedreno/freedreno_bo.c              |    4 ----
 freedreno/freedreno_bo_cache.c        |    4 ----
 freedreno/freedreno_device.c          |    4 ----
 freedreno/freedreno_pipe.c            |    4 ----
 freedreno/freedreno_priv.h            |    4 ----
 freedreno/freedreno_ringbuffer.c      |    4 ----
 freedreno/kgsl/kgsl_bo.c              |    4 ----
 freedreno/kgsl/kgsl_device.c          |    4 ----
 freedreno/kgsl/kgsl_pipe.c            |    4 ----
 freedreno/kgsl/kgsl_ringbuffer.c      |    4 ----
 freedreno/msm/msm_bo.c                |    4 ----
 freedreno/msm/msm_device.c            |    4 ----
 freedreno/msm/msm_pipe.c              |    4 ----
 freedreno/msm/msm_ringbuffer.c        |    4 ----
 intel/intel_bufmgr.c                  |    4 ----
 intel/intel_bufmgr_fake.c             |    4 ----
 intel/intel_bufmgr_gem.c              |    4 ----
 intel/intel_decode.c                  |    4 ----
 intel/mm.c                            |    4 ----
 intel/mm.h                            |    4 ----
 intel/test_decode.c                   |    4 ----
 libkms/api.c                          |    4 ----
 libkms/dumb.c                         |    4 ----
 libkms/exynos.c                       |    4 ----
 libkms/intel.c                        |    4 ----
 libkms/internal.h                     |    4 ----
 libkms/linux.c                        |    4 ----
 libkms/nouveau.c                      |    4 ----
 libkms/radeon.c                       |    4 ----
 libkms/vmwgfx.c                       |    4 ----
 meson.build                           |   17 +++++------------
 nouveau/abi16.c                       |    4 ----
 nouveau/bufctx.c                      |    4 ----
 nouveau/nouveau.c                     |    4 ----
 nouveau/pushbuf.c                     |    4 ----
 omap/omap_drm.c                       |    4 ----
 radeon/radeon_bo.c                    |    3 ---
 radeon/radeon_bo_gem.c                |    3 ---
 radeon/radeon_cs.c                    |    3 ---
 radeon/radeon_cs_gem.c                |    3 ---
 radeon/radeon_cs_space.c              |    3 ---
 radeon/radeon_surface.c               |    3 ---
 tegra/tegra.c                         |    4 ----
 tests/amdgpu/amdgpu_test.c            |    4 ----
 tests/amdgpu/basic_tests.c            |    4 ----
 tests/amdgpu/bo_tests.c               |    4 ----
 tests/amdgpu/cs_tests.c               |    4 ----
 tests/amdgpu/deadlock_tests.c         |    4 ----
 tests/amdgpu/uvd_enc_tests.c          |    4 ----
 tests/amdgpu/vce_tests.c              |    4 ----
 tests/amdgpu/vcn_tests.c              |    4 ----
 tests/amdgpu/vm_tests.c               |    4 ----
 tests/etnaviv/etnaviv_2d_test.c       |    4 ----
 tests/etnaviv/etnaviv_bo_cache_test.c |    4 ----
 tests/exynos/exynos_fimg2d_test.c     |    4 ----
 tests/kms/kms-steal-crtc.c            |    4 ----
 tests/kms/kms-universal-planes.c      |    4 ----
 tests/kms/libkms-test-crtc.c          |    4 ----
 tests/kms/libkms-test-device.c        |    4 ----
 tests/kms/libkms-test-framebuffer.c   |    4 ----
 tests/kms/libkms-test-plane.c         |    4 ----
 tests/kms/libkms-test-screen.c        |    4 ----
 tests/modetest/buffers.c              |    4 ----
 tests/modetest/cursor.c               |    4 ----
 tests/modetest/modetest.c             |    4 ----
 tests/nouveau/threaded.c              |    4 ----
 tests/tegra/openclose.c               |    4 ----
 tests/util/format.c                   |    4 ----
 tests/util/kms.c                      |    4 ----
 tests/util/pattern.c                  |    4 ----
 tests/vbltest/vbltest.c               |    4 ----
 xf86atomic.h                          |    4 ----
 xf86drm.c                             |    3 ---
 xf86drmMode.c                         |    4 ----
 96 files changed, 7 insertions(+), 381 deletions(-)

New commits:
commit 361d4bffd322f2743f8b5ce4a81ed0482105afac
Author: Eric Engestrom <[email protected]>
Date:   Tue Mar 20 14:59:40 2018 +0000

    meson: drop unnecessary variable
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/meson.build b/meson.build
index ddcd25ff..961ee59c 100644
--- a/meson.build
+++ b/meson.build
@@ -31,7 +31,7 @@ pkg = import('pkgconfig')
 
 config = configuration_data()
 
-with_udev = get_option('udev')
+config.set10('UDEV', get_option('udev'))
 with_freedreno_kgsl = get_option('freedreno-kgsl')
 with_install_tests = get_option('install-test-programs')
 
@@ -165,7 +165,6 @@ if _libkms != 'false'
   with_libkms = _libkms == 'true' or ['linux', 'freebsd', 'dragonfly'].contains(host_machine.system())
 endif
 
-config.set10('UDEV', with_udev)
 # Among others FreeBSD does not have a separate dl library.
 if not cc.has_function('dlsym')
   dep_dl = cc.find_library('dl', required : with_nouveau)
commit edaca475e8b21da95ffee11b7287bc976ad31d49
Author: Eric Engestrom <[email protected]>
Date:   Tue Mar 20 14:54:45 2018 +0000

    meson: move line to allow using `config` earlier
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/meson.build b/meson.build
index ade90be1..ddcd25ff 100644
--- a/meson.build
+++ b/meson.build
@@ -29,12 +29,12 @@ project(
 
 pkg = import('pkgconfig')
 
+config = configuration_data()
+
 with_udev = get_option('udev')
 with_freedreno_kgsl = get_option('freedreno-kgsl')
 with_install_tests = get_option('install-test-programs')
 
-config = configuration_data()
-
 if ['freebsd', 'dragonfly', 'netbsd'].contains(host_machine.system())
   dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
 else
commit 56f6d3d48d405024802fa1e52a80f8918fba7fc5
Author: Eric Engestrom <[email protected]>
Date:   Tue Mar 20 14:55:50 2018 +0000

    meson: drop unneeded dependency to libudev
    
    libdrm only needed libudev for a few days 3 years ago,
    between fde4969176822fe54197 and its revert 5b0e76f143887c4ec7db.
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/meson.build b/meson.build
index 74a541e8..ade90be1 100644
--- a/meson.build
+++ b/meson.build
@@ -166,12 +166,6 @@ if _libkms != 'false'
 endif
 
 config.set10('UDEV', with_udev)
-if with_udev
-  dep_udev = dependency('udev')
-else
-  dep_udev = []
-endif
-
 # Among others FreeBSD does not have a separate dl library.
 if not cc.has_function('dlsym')
   dep_dl = cc.find_library('dl', required : with_nouveau)
@@ -294,7 +288,7 @@ libdrm = shared_library(
    config_file,
   ],
   c_args : warn_c_args,
-  dependencies : [dep_udev, dep_valgrind, dep_rt, dep_m],
+  dependencies : [dep_valgrind, dep_rt, dep_m],
   include_directories : inc_drm,
   version : '2.4.0',
   install : true,
commit 0926f0af54d654b1a95826066edcae30b8052581
Author: Eric Engestrom <[email protected]>
Date:   Thu Feb 1 11:12:05 2018 +0000

    meson,configure: include config.h automatically
    
    This will prevent any more missing `#include "config.h"` bug, at the
    cost of having to recompile some files that didn't need to be when
    changing build options.
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/amdgpu/amdgpu_asic_id.c b/amdgpu/amdgpu_asic_id.c
index 62459c09..a5007ffc 100644
--- a/amdgpu/amdgpu_asic_id.c
+++ b/amdgpu/amdgpu_asic_id.c
@@ -22,10 +22,6 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index 3853fd03..cb255cb0 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -22,10 +22,6 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdint.h>
diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
index 4ac9bac7..3c9be6c2 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -21,10 +21,6 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index fb2cfb57..d81efcf8 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -28,10 +28,6 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <sys/stat.h>
 #include <errno.h>
 #include <string.h>
diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c
index 1efffc6f..b68e1c4f 100644
--- a/amdgpu/amdgpu_gpu_info.c
+++ b/amdgpu/amdgpu_gpu_info.c
@@ -22,10 +22,6 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <string.h>
 
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h
index aeb5d651..99b8ce0b 100644
--- a/amdgpu/amdgpu_internal.h
+++ b/amdgpu/amdgpu_internal.h
@@ -25,10 +25,6 @@
 #ifndef _AMDGPU_INTERNAL_H_
 #define _AMDGPU_INTERNAL_H_
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <assert.h>
 #include <pthread.h>
 
diff --git a/amdgpu/amdgpu_vamgr.c b/amdgpu/amdgpu_vamgr.c
index ac1202de..1de9f952 100644
--- a/amdgpu/amdgpu_vamgr.c
+++ b/amdgpu/amdgpu_vamgr.c
@@ -21,10 +21,6 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
diff --git a/amdgpu/amdgpu_vm.c b/amdgpu/amdgpu_vm.c
index 5ba7c082..da9d07f8 100644
--- a/amdgpu/amdgpu_vm.c
+++ b/amdgpu/amdgpu_vm.c
@@ -21,10 +21,6 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "amdgpu.h"
 #include "amdgpu_drm.h"
 #include "xf86drm.h"
diff --git a/amdgpu/util_hash.c b/amdgpu/util_hash.c
index 87cb671b..7e590419 100644
--- a/amdgpu/util_hash.c
+++ b/amdgpu/util_hash.c
@@ -30,10 +30,6 @@
   *   Zack Rusin <[email protected]>
   */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "util_hash.h"
 
 #include <stdlib.h>
diff --git a/amdgpu/util_hash.h b/amdgpu/util_hash.h
index 01a4779b..6eed1569 100644
--- a/amdgpu/util_hash.h
+++ b/amdgpu/util_hash.h
@@ -44,10 +44,6 @@
 #ifndef UTIL_HASH_H
 #define UTIL_HASH_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdbool.h>
 
 #include "libdrm_macros.h"
diff --git a/amdgpu/util_hash_table.c b/amdgpu/util_hash_table.c
index fa7f6eab..89a8bf9b 100644
--- a/amdgpu/util_hash_table.c
+++ b/amdgpu/util_hash_table.c
@@ -38,10 +38,6 @@
  */
 
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "util_hash_table.h"
 #include "util_hash.h"
 
diff --git a/amdgpu/util_hash_table.h b/amdgpu/util_hash_table.h
index e0001289..5e295a81 100644
--- a/amdgpu/util_hash_table.h
+++ b/amdgpu/util_hash_table.h
@@ -34,10 +34,6 @@
 #ifndef U_HASH_TABLE_H_
 #define U_HASH_TABLE_H_
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "libdrm_macros.h"
 
 /**
diff --git a/configure.ac b/configure.ac
index 0e36336c..619af497 100644
--- a/configure.ac
+++ b/configure.ac
@@ -541,6 +541,8 @@ else
     AC_DEFINE(HAVE_VISIBILITY, 0)
 fi
 
+CFLAGS="$CFLAGS -include config.h"
+
 AC_SUBST(WARN_CFLAGS)
 AC_CONFIG_FILES([
 	Makefile
diff --git a/etnaviv/etnaviv_bo.c b/etnaviv/etnaviv_bo.c
index 78b9cd27..32f7b348 100644
--- a/etnaviv/etnaviv_bo.c
+++ b/etnaviv/etnaviv_bo.c
@@ -24,10 +24,6 @@
  *    Christian Gmeiner <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "etnaviv_priv.h"
 #include "etnaviv_drmif.h"
 
diff --git a/etnaviv/etnaviv_bo_cache.c b/etnaviv/etnaviv_bo_cache.c
index 6208230d..c81de262 100644
--- a/etnaviv/etnaviv_bo_cache.c
+++ b/etnaviv/etnaviv_bo_cache.c
@@ -24,10 +24,6 @@
  *    Christian Gmeiner <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "etnaviv_priv.h"
 #include "etnaviv_drmif.h"
 
diff --git a/etnaviv/etnaviv_cmd_stream.c b/etnaviv/etnaviv_cmd_stream.c
index e8c58cd5..13730168 100644
--- a/etnaviv/etnaviv_cmd_stream.c
+++ b/etnaviv/etnaviv_cmd_stream.c
@@ -24,10 +24,6 @@
  *    Christian Gmeiner <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <assert.h>
 
 #include "etnaviv_drmif.h"
diff --git a/etnaviv/etnaviv_device.c b/etnaviv/etnaviv_device.c
index 3ce92030..d83e8d3e 100644
--- a/etnaviv/etnaviv_device.c
+++ b/etnaviv/etnaviv_device.c
@@ -24,10 +24,6 @@
  *    Christian Gmeiner <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <linux/stddef.h>
 #include <linux/types.h>
diff --git a/etnaviv/etnaviv_gpu.c b/etnaviv/etnaviv_gpu.c
index bc355e8f..f7efa028 100644
--- a/etnaviv/etnaviv_gpu.c
+++ b/etnaviv/etnaviv_gpu.c
@@ -24,10 +24,6 @@
  *    Christian Gmeiner <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "etnaviv_priv.h"
 #include "etnaviv_drmif.h"
 
diff --git a/etnaviv/etnaviv_perfmon.c b/etnaviv/etnaviv_perfmon.c
index aa5130a6..5f408a7b 100644
--- a/etnaviv/etnaviv_perfmon.c
+++ b/etnaviv/etnaviv_perfmon.c
@@ -25,10 +25,6 @@
  *    Christian Gmeiner <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "etnaviv_priv.h"
 
 static int etna_perfmon_query_signals(struct etna_perfmon *pm, struct etna_perfmon_domain *dom)
diff --git a/etnaviv/etnaviv_pipe.c b/etnaviv/etnaviv_pipe.c
index 94c5d377..53954aa3 100644
--- a/etnaviv/etnaviv_pipe.c
+++ b/etnaviv/etnaviv_pipe.c
@@ -24,10 +24,6 @@
  *    Christian Gmeiner <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "etnaviv_priv.h"
 
 int etna_pipe_wait(struct etna_pipe *pipe, uint32_t timestamp, uint32_t ms)
diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c
index f6204f1c..e1afef65 100644
--- a/exynos/exynos_drm.c
+++ b/exynos/exynos_drm.c
@@ -24,10 +24,6 @@
  *    Inki Dae <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 5658a48e..bca884b9 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -23,10 +23,6 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index 331b8227..34c285fb 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "freedreno_drmif.h"
 #include "freedreno_priv.h"
 
diff --git a/freedreno/freedreno_bo_cache.c b/freedreno/freedreno_bo_cache.c
index d922f3a9..3b737159 100644
--- a/freedreno/freedreno_bo_cache.c
+++ b/freedreno/freedreno_bo_cache.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "freedreno_drmif.h"
 #include "freedreno_priv.h"
 
diff --git a/freedreno/freedreno_device.c b/freedreno/freedreno_device.c
index a0334bf4..0b42561a 100644
--- a/freedreno/freedreno_device.c
+++ b/freedreno/freedreno_device.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
diff --git a/freedreno/freedreno_pipe.c b/freedreno/freedreno_pipe.c
index 1540474b..77b160e7 100644
--- a/freedreno/freedreno_pipe.c
+++ b/freedreno/freedreno_pipe.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "freedreno_drmif.h"
 #include "freedreno_priv.h"
 
diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h
index a0957fad..6c9e509f 100644
--- a/freedreno/freedreno_priv.h
+++ b/freedreno/freedreno_priv.h
@@ -29,10 +29,6 @@
 #ifndef FREEDRENO_PRIV_H_
 #define FREEDRENO_PRIV_H_
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/freedreno/freedreno_ringbuffer.c b/freedreno/freedreno_ringbuffer.c
index 7310f1fd..3834b51b 100644
--- a/freedreno/freedreno_ringbuffer.c
+++ b/freedreno/freedreno_ringbuffer.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <assert.h>
 
 #include "freedreno_drmif.h"
diff --git a/freedreno/kgsl/kgsl_bo.c b/freedreno/kgsl/kgsl_bo.c
index ab3485e3..c6d2d499 100644
--- a/freedreno/kgsl/kgsl_bo.c
+++ b/freedreno/kgsl/kgsl_bo.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "kgsl_priv.h"
 
 #include <linux/fb.h>
diff --git a/freedreno/kgsl/kgsl_device.c b/freedreno/kgsl/kgsl_device.c
index 958e8a72..914f3412 100644
--- a/freedreno/kgsl/kgsl_device.c
+++ b/freedreno/kgsl/kgsl_device.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
diff --git a/freedreno/kgsl/kgsl_pipe.c b/freedreno/kgsl/kgsl_pipe.c
index 80bd1313..0a8b6586 100644
--- a/freedreno/kgsl/kgsl_pipe.c
+++ b/freedreno/kgsl/kgsl_pipe.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "kgsl_priv.h"
 
 
diff --git a/freedreno/kgsl/kgsl_ringbuffer.c b/freedreno/kgsl/kgsl_ringbuffer.c
index f09c433b..a756deda 100644
--- a/freedreno/kgsl/kgsl_ringbuffer.c
+++ b/freedreno/kgsl/kgsl_ringbuffer.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <assert.h>
 
 #include "freedreno_ringbuffer.h"
diff --git a/freedreno/msm/msm_bo.c b/freedreno/msm/msm_bo.c
index 281c5aa7..8b3d0bcb 100644
--- a/freedreno/msm/msm_bo.c
+++ b/freedreno/msm/msm_bo.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "msm_priv.h"
 
 static int bo_allocate(struct msm_bo *msm_bo)
diff --git a/freedreno/msm/msm_device.c b/freedreno/msm/msm_device.c
index c454938d..7bb57677 100644
--- a/freedreno/msm/msm_device.c
+++ b/freedreno/msm/msm_device.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
diff --git a/freedreno/msm/msm_pipe.c b/freedreno/msm/msm_pipe.c
index 12e4be59..f28778ef 100644
--- a/freedreno/msm/msm_pipe.c
+++ b/freedreno/msm/msm_pipe.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include "msm_priv.h"
 
 static int query_param(struct fd_pipe *pipe, uint32_t param,
diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c
index c75bb169..a87e1b9a 100644
--- a/freedreno/msm/msm_ringbuffer.c
+++ b/freedreno/msm/msm_ringbuffer.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <assert.h>
 #include <inttypes.h>
 
diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c
index a2853400..bede0a21 100644
--- a/intel/intel_bufmgr.c
+++ b/intel/intel_bufmgr.c
@@ -25,10 +25,6 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <string.h>
 #include <stdlib.h>
 #include <stdint.h>
diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c
index 641df6a1..3b24b81b 100644
--- a/intel/intel_bufmgr_fake.c
+++ b/intel/intel_bufmgr_fake.c
@@ -34,10 +34,6 @@
  * the bugs in the old texture manager.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 386da30e..5c47a46f 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -34,10 +34,6 @@
  *	    Dave Airlie <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <xf86drm.h>
 #include <xf86atomic.h>
 #include <fcntl.h>
diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index 3a81500f..bc7b04b8 100644
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
@@ -21,10 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <assert.h>
 #include <stdint.h>
 #include <stdlib.h>
diff --git a/intel/mm.c b/intel/mm.c
index 954e9dcb..79d8719d 100644
--- a/intel/mm.c
+++ b/intel/mm.c
@@ -22,10 +22,6 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <assert.h>
 
diff --git a/intel/mm.h b/intel/mm.h
index 8d83743f..1b0f84fc 100644
--- a/intel/mm.h
+++ b/intel/mm.h
@@ -29,10 +29,6 @@
 #ifndef MM_H
 #define MM_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "libdrm_macros.h"
 
 struct mem_block {
diff --git a/intel/test_decode.c b/intel/test_decode.c
index 68f777b0..b9f5b927 100644
--- a/intel/test_decode.c
+++ b/intel/test_decode.c
@@ -21,10 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/libkms/api.c b/libkms/api.c
index 354d8a2e..22dd32d7 100644
--- a/libkms/api.c
+++ b/libkms/api.c
@@ -26,10 +26,6 @@
  **************************************************************************/
 
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/libkms/dumb.c b/libkms/dumb.c
index b95a072c..17efc10a 100644
--- a/libkms/dumb.c
+++ b/libkms/dumb.c
@@ -26,10 +26,6 @@
  **************************************************************************/
 
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libkms/exynos.c b/libkms/exynos.c
index c20b6b05..ef64a668 100644
--- a/libkms/exynos.c
+++ b/libkms/exynos.c
@@ -25,10 +25,6 @@
  * SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libkms/intel.c b/libkms/intel.c
index 3d8ca055..859e7a0f 100644
--- a/libkms/intel.c
+++ b/libkms/intel.c
@@ -26,10 +26,6 @@
  **************************************************************************/
 
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libkms/internal.h b/libkms/internal.h
index 905f5b17..8b386db6 100644
--- a/libkms/internal.h
+++ b/libkms/internal.h
@@ -29,10 +29,6 @@
 #ifndef INTERNAL_H_
 #define INTERNAL_H_
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "libdrm_macros.h"
 #include "libkms.h"
 
diff --git a/libkms/linux.c b/libkms/linux.c
index 1431eb10..56205054 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -29,10 +29,6 @@
  * going from fd to pci id via fstat and udev.
  */
 
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libkms/nouveau.c b/libkms/nouveau.c
index d10e0fdb..7fe23db3 100644
--- a/libkms/nouveau.c
+++ b/libkms/nouveau.c
@@ -26,10 +26,6 @@
  **************************************************************************/
 
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libkms/radeon.c b/libkms/radeon.c
index aaeeaf31..2cb2b11f 100644
--- a/libkms/radeon.c
+++ b/libkms/radeon.c
@@ -26,10 +26,6 @@
  **************************************************************************/
 
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libkms/vmwgfx.c b/libkms/vmwgfx.c
index 6a24fd4d..f0e40be7 100644
--- a/libkms/vmwgfx.c
+++ b/libkms/vmwgfx.c
@@ -26,10 +26,6 @@
  **************************************************************************/
 
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/meson.build b/meson.build
index 100a59fa..74a541e8 100644
--- a/meson.build
+++ b/meson.build
@@ -280,7 +280,7 @@ config_file = configure_file(
   configuration : config,
   output : 'config.h',
 )
-add_project_arguments('-DHAVE_CONFIG_H', language : 'c')
+add_project_arguments('-include', 'config.h', language : 'c')
 
 inc_root = include_directories('.')
 inc_drm = include_directories('include/drm')
diff --git a/nouveau/abi16.c b/nouveau/abi16.c
index ee38c0cb..ba2501ea 100644
--- a/nouveau/abi16.c
+++ b/nouveau/abi16.c
@@ -22,10 +22,6 @@
  * Authors: Ben Skeggs
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <stdlib.h>
 #include <stdint.h>
 #include <stddef.h>
diff --git a/nouveau/bufctx.c b/nouveau/bufctx.c
index 4f76e5df..67b7570e 100644
--- a/nouveau/bufctx.c
+++ b/nouveau/bufctx.c
@@ -22,10 +22,6 @@
  * Authors: Ben Skeggs
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index e113a8fe..55593517 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -22,10 +22,6 @@
  * Authors: Ben Skeggs
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
diff --git a/nouveau/pushbuf.c b/nouveau/pushbuf.c
index 035e3019..445c966e 100644
--- a/nouveau/pushbuf.c
+++ b/nouveau/pushbuf.c
@@ -22,10 +22,6 @@
  * Authors: Ben Skeggs
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
diff --git a/omap/omap_drm.c b/omap/omap_drm.c
index 08ba64eb..417d522c 100644
--- a/omap/omap_drm.c
+++ b/omap/omap_drm.c
@@ -26,10 +26,6 @@
  *    Rob Clark <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <linux/stddef.h>
 #include <linux/types.h>
diff --git a/radeon/radeon_bo.c b/radeon/radeon_bo.c
index 447f9280..821807bc 100644
--- a/radeon/radeon_bo.c
+++ b/radeon/radeon_bo.c
@@ -29,9 +29,6 @@
  *      Dave Airlie
  *      Jérôme Glisse <[email protected]>
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
 #include <libdrm_macros.h>
 #include <radeon_bo.h>
 #include <radeon_bo_int.h>
diff --git a/radeon/radeon_bo_gem.c b/radeon/radeon_bo_gem.c
index fbd453d9..774b26e4 100644
--- a/radeon/radeon_bo_gem.c
+++ b/radeon/radeon_bo_gem.c
@@ -29,9 +29,6 @@
  *      Dave Airlie
  *      Jérôme Glisse <[email protected]>
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
diff --git a/radeon/radeon_cs.c b/radeon/radeon_cs.c
index dffb869f..eb7859e5 100644
--- a/radeon/radeon_cs.c
+++ b/radeon/radeon_cs.c
@@ -1,6 +1,3 @@
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
 #include "libdrm_macros.h"
 #include <stdio.h>
 #include "radeon_cs.h"
diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c
index f3dccb6c..4d5fc13a 100644
--- a/radeon/radeon_cs_gem.c
+++ b/radeon/radeon_cs_gem.c
@@ -29,9 +29,6 @@
  *      Nicolai Haehnle <[email protected]>
  *      Jérôme Glisse <[email protected]>
  */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
 #include <assert.h>
 #include <errno.h>
 #include <stdlib.h>
diff --git a/radeon/radeon_cs_space.c b/radeon/radeon_cs_space.c
index 69287be5..8531c345 100644
--- a/radeon/radeon_cs_space.c
+++ b/radeon/radeon_cs_space.c
@@ -25,9 +25,6 @@
  */
 /*
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
 #include <assert.h>
 #include <errno.h>
 #include <stdlib.h>
diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c
index 04df77d6..3cafcfcb 100644
--- a/radeon/radeon_surface.c
+++ b/radeon/radeon_surface.c
@@ -26,9 +26,6 @@
  * Authors:
  *      Jérôme Glisse <[email protected]>
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
 #include <stdbool.h>
 #include <assert.h>
 #include <errno.h>
diff --git a/tegra/tegra.c b/tegra/tegra.c
index f7dc89ad..1d7268e5 100644
--- a/tegra/tegra.c
+++ b/tegra/tegra.c
@@ -22,10 +22,6 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 #include <errno.h>
 #include <fcntl.h>
 #include <string.h>
diff --git a/tests/amdgpu/amdgpu_test.c b/tests/amdgpu/amdgpu_test.c
index e49f4a6c..96fcd687 100644
--- a/tests/amdgpu/amdgpu_test.c
+++ b/tests/amdgpu/amdgpu_test.c
@@ -21,10 +21,6 @@
  *
 */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
index 0ea010a8..1adbddd9 100644
--- a/tests/amdgpu/basic_tests.c
+++ b/tests/amdgpu/basic_tests.c
@@ -21,10 +21,6 @@
  *
 */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/tests/amdgpu/bo_tests.c b/tests/amdgpu/bo_tests.c
index 24698bcb..9d4da4af 100644
--- a/tests/amdgpu/bo_tests.c
+++ b/tests/amdgpu/bo_tests.c
@@ -21,10 +21,6 @@
  *
 */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdio.h>
 
 #include "CUnit/Basic.h"
diff --git a/tests/amdgpu/cs_tests.c b/tests/amdgpu/cs_tests.c
index a5361cd5..7ad0f0dc 100644
--- a/tests/amdgpu/cs_tests.c
+++ b/tests/amdgpu/cs_tests.c
@@ -21,10 +21,6 @@
  *
 */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdio.h>
 
 #include "CUnit/Basic.h"
diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c
index 96c99c96..1eb5761a 100644
--- a/tests/amdgpu/deadlock_tests.c
+++ b/tests/amdgpu/deadlock_tests.c
@@ -21,10 +21,6 @@
  *
 */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/tests/amdgpu/uvd_enc_tests.c b/tests/amdgpu/uvd_enc_tests.c
index 0377c1a5..b4251bcf 100644
--- a/tests/amdgpu/uvd_enc_tests.c
+++ b/tests/amdgpu/uvd_enc_tests.c
@@ -21,10 +21,6 @@
  *
 */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdio.h>
 #include <inttypes.h>
 
diff --git a/tests/amdgpu/vce_tests.c b/tests/amdgpu/vce_tests.c
index 75821bbb..25c0b1fb 100644
--- a/tests/amdgpu/vce_tests.c
+++ b/tests/amdgpu/vce_tests.c
@@ -21,10 +21,6 @@
  *
 */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdio.h>
 #include <inttypes.h>
 
diff --git a/tests/amdgpu/vcn_tests.c b/tests/amdgpu/vcn_tests.c
index 2eb8c434..d9f05af8 100644
--- a/tests/amdgpu/vcn_tests.c
+++ b/tests/amdgpu/vcn_tests.c
@@ -21,10 +21,6 @@
  *
 */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdio.h>
 #include <inttypes.h>
 
diff --git a/tests/amdgpu/vm_tests.c b/tests/amdgpu/vm_tests.c
index 502a9405..7b6dc5d6 100644
--- a/tests/amdgpu/vm_tests.c
+++ b/tests/amdgpu/vm_tests.c
@@ -21,10 +21,6 @@
  *
 */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "CUnit/Basic.h"
 
 #include "amdgpu_test.h"
diff --git a/tests/etnaviv/etnaviv_2d_test.c b/tests/etnaviv/etnaviv_2d_test.c
index 10751c73..8dd77b66 100644
--- a/tests/etnaviv/etnaviv_2d_test.c
+++ b/tests/etnaviv/etnaviv_2d_test.c
@@ -24,10 +24,6 @@
  *    Christian Gmeiner <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 #include <fcntl.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/tests/etnaviv/etnaviv_bo_cache_test.c b/tests/etnaviv/etnaviv_bo_cache_test.c
index fb01f8d3..7fb06293 100644
--- a/tests/etnaviv/etnaviv_bo_cache_test.c
+++ b/tests/etnaviv/etnaviv_bo_cache_test.c
@@ -24,10 +24,6 @@
  *    Christian Gmeiner <[email protected]>
  */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 #undef NDEBUG
 #include <assert.h>
 
diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c
index dcb2e35a..99bb9233 100644
--- a/tests/exynos/exynos_fimg2d_test.c
+++ b/tests/exynos/exynos_fimg2d_test.c
@@ -23,10 +23,6 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/tests/kms/kms-steal-crtc.c b/tests/kms/kms-steal-crtc.c
index 4b830d27..cd40758d 100644
--- a/tests/kms/kms-steal-crtc.c
+++ b/tests/kms/kms-steal-crtc.c
@@ -21,10 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
diff --git a/tests/kms/kms-universal-planes.c b/tests/kms/kms-universal-planes.c
index 89057bb5..2163c987 100644
--- a/tests/kms/kms-universal-planes.c
+++ b/tests/kms/kms-universal-planes.c
@@ -21,10 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <fcntl.h>
 #include <getopt.h>
 #include <stdbool.h>
diff --git a/tests/kms/libkms-test-crtc.c b/tests/kms/libkms-test-crtc.c
index 3adb4903..2c28face 100644
--- a/tests/kms/libkms-test-crtc.c
+++ b/tests/kms/libkms-test-crtc.c
@@ -21,10 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "libkms-test.h"
 
 struct kms_crtc *kms_crtc_create(struct kms_device *device, uint32_t id)
diff --git a/tests/kms/libkms-test-device.c b/tests/kms/libkms-test-device.c
index 042ae05d..d3bb11ce 100644
--- a/tests/kms/libkms-test-device.c
+++ b/tests/kms/libkms-test-device.c
@@ -21,10 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/tests/kms/libkms-test-framebuffer.c b/tests/kms/libkms-test-framebuffer.c
index c9e5ad3c..9bb2d95b 100644
--- a/tests/kms/libkms-test-framebuffer.c
+++ b/tests/kms/libkms-test-framebuffer.c
@@ -21,10 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <string.h>
 
diff --git a/tests/kms/libkms-test-plane.c b/tests/kms/libkms-test-plane.c
index 8eb78af1..6c40a3c9 100644
--- a/tests/kms/libkms-test-plane.c
+++ b/tests/kms/libkms-test-plane.c
@@ -21,10 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <string.h>
 
diff --git a/tests/kms/libkms-test-screen.c b/tests/kms/libkms-test-screen.c
index 33690222..bbe972a0 100644
--- a/tests/kms/libkms-test-screen.c
+++ b/tests/kms/libkms-test-screen.c
@@ -21,10 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <string.h>
 
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c
index 4fd310b9..9b635c0c 100644
--- a/tests/modetest/buffers.c
+++ b/tests/modetest/buffers.c
@@ -24,10 +24,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <assert.h>
 #include <errno.h>
 #include <stdio.h>
diff --git a/tests/modetest/cursor.c b/tests/modetest/cursor.c
index 6de82a4a..829bced1 100644
--- a/tests/modetest/cursor.c
+++ b/tests/modetest/cursor.c
@@ -22,10 +22,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <assert.h>
 #include <errno.h>
 #include <stdio.h>
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index fb9f15fc..62957d84 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -38,10 +38,6 @@
  *       the mode has been programmed, along with possible test patterns.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <assert.h>
 #include <ctype.h>
 #include <stdbool.h>
diff --git a/tests/nouveau/threaded.c b/tests/nouveau/threaded.c
index 281af460..3669bcd3 100644
--- a/tests/nouveau/threaded.c
+++ b/tests/nouveau/threaded.c
@@ -20,10 +20,6 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 #include <sys/ioctl.h>
 #include <dlfcn.h>
 #include <fcntl.h>
diff --git a/tests/tegra/openclose.c b/tests/tegra/openclose.c
index 881d8aa4..f80f52d4 100644
--- a/tests/tegra/openclose.c
+++ b/tests/tegra/openclose.c
@@ -20,10 +20,6 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 #include <fcntl.h>
 #include <stdio.h>
 #include <unistd.h>
diff --git a/tests/util/format.c b/tests/util/format.c
index 043cfe7f..15ac5e1e 100644
--- a/tests/util/format.c
+++ b/tests/util/format.c
@@ -23,10 +23,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/tests/util/kms.c b/tests/util/kms.c
index 028cc8d9..8b3e7878 100644
--- a/tests/util/kms.c
+++ b/tests/util/kms.c
@@ -37,10 +37,6 @@
  *       the mode has been programmed, along with possible test patterns.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <errno.h>
 #include <stdint.h>
 #include <stdio.h>
diff --git a/tests/util/pattern.c b/tests/util/pattern.c
index 75a458d4..9fa0a417 100644
--- a/tests/util/pattern.c
+++ b/tests/util/pattern.c
@@ -23,10 +23,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c
index 3f6b803a..48708d20 100644
--- a/tests/vbltest/vbltest.c
+++ b/tests/vbltest/vbltest.c
@@ -24,10 +24,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/xf86atomic.h b/xf86atomic.h
index 70e91866..2d733bd5 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -34,10 +34,6 @@
 #ifndef LIBDRM_ATOMICS_H
 #define LIBDRM_ATOMICS_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #if HAVE_LIBDRM_ATOMIC_PRIMITIVES
 
 #define HAS_ATOMIC_OPS 1
diff --git a/xf86drm.c b/xf86drm.c
index 9328bf5a..689e8fe9 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -31,9 +31,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
diff --git a/xf86drmMode.c b/xf86drmMode.c
index bd59ef25..cf8e1eac 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -38,10 +38,6 @@
  * platforms find which headers to include to get uint32_t
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <limits.h>
 #include <stdint.h>
 #include <stdlib.h>

------------------------------------------------------------------------------
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