From patchwork Wed Nov 22 10:45:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Latvala X-Patchwork-Id: 10070213 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A8D5B603FA for ; Wed, 22 Nov 2017 10:45:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9967E29C6A for ; Wed, 22 Nov 2017 10:45:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BDE329C6C; Wed, 22 Nov 2017 10:45:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C88ED29C6A for ; Wed, 22 Nov 2017 10:45:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F27386E037; Wed, 22 Nov 2017 10:45:52 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from johanna3.inet.fi (mta-out1.inet.fi [62.71.2.233]) by gabe.freedesktop.org (Postfix) with ESMTP id A8DF26E037 for ; Wed, 22 Nov 2017 10:45:51 +0000 (UTC) RazorGate-KAS: Status: not_detected RazorGate-KAS: Rate: 0 RazorGate-KAS: Envelope from: RazorGate-KAS: Version: 5.5.3 RazorGate-KAS: LuaCore: 80 2014-11-10_18-01-23 260f8afb9361da3c7edfd3a8e3a4ca908191ad29 RazorGate-KAS: Lua profiles 69136 [Nov 12 2014] RazorGate-KAS: Method: none Received: from hufflepuff.adrinael.net (84.248.197.237) by johanna3.inet.fi (9.0.002.03-2-gbe5d057) id 5A0D999700A7B235; Wed, 22 Nov 2017 12:45:50 +0200 Received: from adrinael by hufflepuff.adrinael.net with local (Exim 4.84_2) (envelope-from ) id 1eHSXO-0001hv-Br; Wed, 22 Nov 2017 12:45:50 +0200 From: Petri Latvala To: intel-gfx@lists.freedesktop.org Date: Wed, 22 Nov 2017 12:45:44 +0200 Message-Id: <1511347544-6519-1-git-send-email-petri.latvala@intel.com> X-Mailer: git-send-email 2.1.4 Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH i-g-t] Revert "tests: Remove libdrm_vc4 dependency." X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This commit caused a build error with vc4 enabled: ../../../lib/igt_vc4.c:42:10: fatal error: vc4_packet.h: No such file or directory #include "vc4_packet.h" ^~~~~~~~~~~~~~ This reverts commit d21e95ca81da6f9332999ceebe6b42e4425d3bb6. Signed-off-by: Petri Latvala CC: Eric Anholt CC: Daniel Vetter --- configure.ac | 12 ++++++++---- lib/Makefile.am | 2 +- lib/meson.build | 6 ++++-- meson.build | 1 + tests/Makefile.am | 12 +++++++++++- tests/meson.build | 18 +++++++++++------- 6 files changed, 36 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index adb59981..53ef704e 100644 --- a/configure.ac +++ b/configure.ac @@ -288,12 +288,16 @@ fi AM_CONDITIONAL(HAVE_LIBDRM_NOUVEAU, [test "x$NOUVEAU" = xyes]) AC_ARG_ENABLE(vc4, AS_HELP_STRING([--disable-vc4], - [Enable building of vc4 tests (default: yes)]), - [VC4=$enableval], [VC4=yes]) + [Enable building of vc4 tests (default: auto)]), + [VC4=$enableval], [VC4=auto]) +if test "x$VC4" = xauto; then + PKG_CHECK_EXISTS([libdrm_vc4], [VC4=yes], [VC4=no]) +fi if test "x$VC4" = xyes; then - AC_DEFINE(BUILD_VC4, 1, [Have vc4 support]) + PKG_CHECK_MODULES(DRM_VC4, [libdrm_vc4]) + AC_DEFINE(HAVE_LIBDRM_VC4, 1, [Have vc4 support]) fi -AM_CONDITIONAL(BUILD_VC4, [test "x$VC4" = xyes]) +AM_CONDITIONAL(HAVE_LIBDRM_VC4, [test "x$VC4" = xyes]) # Define a configure option for the shader debugger AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger], diff --git a/lib/Makefile.am b/lib/Makefile.am index 9c511dc0..7b3d8778 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -10,7 +10,7 @@ libintel_tools_la_SOURCES = $(lib_source_list) noinst_LTLIBRARIES = libintel_tools.la noinst_HEADERS = check-ndebug.h -if BUILD_VC4 +if HAVE_LIBDRM_VC4 libintel_tools_la_SOURCES += \ igt_vc4.c \ igt_vc4.h diff --git a/lib/meson.build b/lib/meson.build index 253548dc..ddf93ec6 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -47,7 +47,6 @@ lib_headers = [ 'igt_dummyload.h', 'uwildmat/uwildmat.h', 'igt_kmod.h', - 'igt_vc4.h', ] lib_sources = [ @@ -96,7 +95,6 @@ lib_sources = [ 'igt_dummyload.c', 'uwildmat/uwildmat.c', 'igt_kmod.c', - 'igt_vc4.c', ] lib_deps = [ @@ -120,6 +118,10 @@ else lib_sources += 'stubs/drm/intel_bufmgr.c' endif +if libdrm_vc4.found() + lib_headers += 'igt_vc4.h' + lib_sources += 'igt_vc4.c' +endif if valgrind.found() lib_deps += valgrind endif diff --git a/meson.build b/meson.build index 2361866b..b14617a5 100644 --- a/meson.build +++ b/meson.build @@ -32,6 +32,7 @@ config = configuration_data() libdrm = dependency('libdrm', version : '>=2.4.82') libdrm_intel = dependency('libdrm_intel', required : false) +libdrm_vc4 = dependency('libdrm_vc4', required : false) libdrm_nouveau = dependency('libdrm_nouveau', required : false) libdrm_amdgpu = dependency('libdrm_amdgpu', required : false) diff --git a/tests/Makefile.am b/tests/Makefile.am index a4a16838..92b7ee6e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -10,7 +10,7 @@ if HAVE_LIBDRM_NOUVEAU TESTS_progs += $(NOUVEAU_TESTS) endif -if BUILD_VC4 +if HAVE_LIBDRM_VC4 TESTS_progs += $(VC4_TESTS) endif @@ -143,6 +143,16 @@ prime_nv_api_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS) prime_nv_api_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS) prime_nv_pcopy_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS) prime_nv_pcopy_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS) +vc4_create_bo_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +vc4_create_bo_LDADD = $(LDADD) $(DRM_VC4_LIBS) +vc4_lookup_fail_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +vc4_lookup_fail_LDADD = $(LDADD) $(DRM_VC4_LIBS) +vc4_dmabuf_poll_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +vc4_dmabuf_poll_LDADD = $(LDADD) $(DRM_VC4_LIBS) +vc4_wait_bo_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +vc4_wait_bo_LDADD = $(LDADD) $(DRM_VC4_LIBS) +vc4_wait_seqno_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS) +vc4_wait_seqno_LDADD = $(LDADD) $(DRM_VC4_LIBS) kms_chamelium_CFLAGS = $(AM_CFLAGS) $(XMLRPC_CFLAGS) $(LIBUDEV_CFLAGS) kms_chamelium_LDADD = $(LDADD) $(XMLRPC_LIBS) $(LIBUDEV_LIBS) diff --git a/tests/meson.build b/tests/meson.build index 5af4e515..20ff79dc 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -213,13 +213,6 @@ test_progs = [ 'syncobj_wait', 'template', 'tools_test', - 'vc4_create_bo', - 'vc4_dmabuf_poll', - 'vc4_label_bo', - 'vc4_lookup_fail', - 'vc4_tiling', - 'vc4_wait_bo', - 'vc4_wait_seqno', 'vgem_basic', 'vgem_slow', ] @@ -245,6 +238,17 @@ if libdrm_nouveau.found() test_deps += libdrm_nouveau endif +if libdrm_vc4.found() + test_progs += [ + 'vc4_create_bo', + 'vc4_dmabuf_poll', + 'vc4_lookup_fail', + 'vc4_wait_bo', + 'vc4_wait_seqno', + ] + test_deps += libdrm_vc4 +endif + if chamelium.found() test_progs += [ 'kms_chamelium',