build: Define _GNU_SOURCE in Makefile.am
Subsystems (3)
PATCH 1/12 build: Define _GNU_SOURCE in Makefile.am
In meson I want to just set this everywhere (no reason not to), and doing so will allow us to clean up a few things.
But that means autofoo needs to follow suit.
--- benchmarks/Makefile.am | 2 +- lib/Makefile.am | 1 + lib/tests/Makefile.am | 1 + tests/Makefile.am | 1 + tools/Makefile.am | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-)
benchmarks/Makefile.am +1 -1
@@ -8,7 +8,7 @@ endif AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) \ - $(WERROR_CFLAGS) + $(WERROR_CFLAGS) -D_GNU_SOURCE LDADD = $(top_builddir)/lib/libigt.la benchmarks_LTLIBRARIES = gem_exec_tracer.la
lib/Makefile.am +1 -0
@@ -64,6 +64,7 @@ AM_CFLAGS = \ $(ALSA_CFLAGS) \ -DIGT_SRCDIR=\""$(abs_top_srcdir)/tests"\" \ -DIGT_DATADIR=\""$(pkgdatadir)"\" \ + -D_GNU_SOURCE \ -DIGT_LOG_DOMAIN=\""$(subst _,-,$*)"\" \ -pthread
lib/tests/Makefile.am +1 -0
@@ -12,6 +12,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(DEBUG_CFLAGS) \ -I$(srcdir)/.. \ -include "$(srcdir)/../../lib/check-ndebug.h" \ -DIGT_DATADIR=\""$(abs_srcdir)"\" \ + -D_GNU_SOURCE $(NULL) LDADD = ../libigt.la $(PCIACCESS_LIBS) $(DRM_LIBS) $(LIBUNWIND_LIBS) $(TIMER_LIBS)
tests/Makefile.am +1 -0
@@ -76,6 +76,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) -Wno-unused-result $(DEBUG_CFLAGS)\ -include "$(srcdir)/../lib/check-ndebug.h" \ -DIGT_SRCDIR=\""$(abs_srcdir)"\" \ -DIGT_DATADIR=\""$(pkgdatadir)"\" \ + -D_GNU_SOURCE \ $(LIBUNWIND_CFLAGS) $(WERROR_CFLAGS) \ $(NULL)
tools/Makefile.am +1 -1
@@ -18,7 +18,7 @@ SUBDIRS = null_state_gen registers AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \ $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) -DPKGDATADIR=\"$(pkgdatadir)\" \ - $(WERROR_CFLAGS) + $(WERROR_CFLAGS) -D_GNU_SOURCE LDADD = $(top_builddir)/lib/libigt.la AM_LDFLAGS = -Wl,--as-needed
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/12 build: Nuke #ifdef HAVE_CONFIG_H cargo-cult
We have it. Daniel Stone said it comes from the X11 transition to the modular build.
--- lib/igt_alsa.h | 2 -- lib/igt_audio.h | 2 -- lib/igt_chamelium.h | 2 -- lib/igt_frame.h | 2 -- lib/igt_x86.c | 2 -- lib/intel_os.c | 2 -- overlay/overlay.h | 2 -- overlay/x11/position.c | 2 -- tests/amdgpu/amd_basic.c | 2 -- tests/debugfs_test.c | 2 -- tests/gem_fence_thrash.c | 2 -- tests/gem_fence_upload.c | 2 -- tests/gem_render_linear_blits.c | 2 -- tests/kms_flip.c | 2 -- tests/kms_render.c | 2 -- tests/kms_setmode.c | 2 -- tests/testdisplay.c | 2 -- tests/testdisplay_hotplug.c | 2 -- tests/tools_test.c | 2 -- tools/intel_gpu_top.c | 2 -- tools/intel_gvtg_test.c | 2 -- tools/intel_l3_parity.c | 2 -- tools/intel_l3_udev_listener.c | 2 -- 23 files changed, 46 deletions(-)
lib/igt_alsa.h +0 -2
@@ -27,9 +27,7 @@#ifndef IGT_ALSA_H #define IGT_ALSA_H -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <stdbool.h>
lib/igt_audio.h +0 -2
@@ -27,9 +27,7 @@#ifndef IGT_AUDIO_H #define IGT_AUDIO_H -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <stdbool.h>
lib/igt_chamelium.h +0 -2
@@ -26,9 +26,7 @@#ifndef IGT_CHAMELIUM_H #define IGT_CHAMELIUM_H -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <stdbool.h>
lib/igt_frame.h +0 -2
@@ -27,9 +27,7 @@#ifndef IGT_FRAME_H #define IGT_FRAME_H -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <stdbool.h>
lib/igt_x86.c +0 -2
@@ -25,9 +25,7 @@* */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #ifdef HAVE_CPUID_H #include <cpuid.h>
lib/intel_os.c +0 -2
@@ -26,9 +26,7 @@* */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include <unistd.h> #include <stdlib.h>
overlay/overlay.h +0 -2
@@ -25,9 +25,7 @@#ifndef OVERLAY_H #define OVERLAY_H -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include <cairo.h>
overlay/x11/position.c +0 -2
@@ -22,9 +22,7 @@* */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include <X11/Xlib.h> #ifdef HAVE_XRANDR
tests/amdgpu/amd_basic.c +0 -2
@@ -22,9 +22,7 @@* Based on libdrm/tests/amdgpu/basic_tests.c */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include <stdio.h> #include <stdlib.h>
tests/debugfs_test.c +0 -2
@@ -20,9 +20,7 @@* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include "igt_sysfs.h" #include <fcntl.h>
tests/gem_fence_thrash.c +0 -2
@@ -26,9 +26,7 @@* */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <unistd.h>
tests/gem_fence_upload.c +0 -2
@@ -25,9 +25,7 @@* */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <unistd.h>
tests/gem_render_linear_blits.c +0 -2
@@ -33,9 +33,7 @@* The goal is to simply ensure the basics work. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <stdlib.h>
tests/kms_flip.c +0 -2
@@ -21,9 +21,7 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h"
tests/kms_render.c +0 -2
@@ -20,9 +20,7 @@* Authors: * Imre Deak <[email protected]> */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <cairo.h>
tests/kms_setmode.c +0 -2
@@ -20,9 +20,7 @@* Authors: * Imre Deak <[email protected]> */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <cairo.h>
tests/testdisplay.c +0 -2
@@ -45,9 +45,7 @@* - DP commands (e.g. poweroff) * - verify outputs against VBT/physical connectors */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <cairo.h>
tests/testdisplay_hotplug.c +0 -2
@@ -29,9 +29,7 @@#include <sys/stat.h> #include "testdisplay.h" -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #ifdef HAVE_UDEV
tests/tools_test.c +0 -2
@@ -20,9 +20,7 @@* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <stdio.h> #include <sys/types.h>
tools/intel_gpu_top.c +0 -2
@@ -27,9 +27,7 @@* */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include <unistd.h> #include <stdlib.h>
tools/intel_gvtg_test.c +0 -2
@@ -28,9 +28,7 @@* TODO: * Enable more GVT-g related test cases. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "igt.h" #include <errno.h>
tools/intel_l3_parity.c +0 -2
@@ -39,9 +39,7 @@#include "intel_io.h" #include "igt_sysfs.h" #include "drmtest.h" -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #ifdef HAVE_UDEV #include <libudev.h> #include <syslog.h>
tools/intel_l3_udev_listener.c +0 -2
@@ -21,9 +21,7 @@* DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #ifdef HAVE_UDEV #include <libudev.h>
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 02/12] build: Nuke #ifdef HAVE_CONFIG_H cargo-cult
Quoting Daniel Vetter (2017-09-02 18:03:56)
Quoted 2 lines
We have it. Daniel Stone said it comes from the X11 transition to the modular build.
What? It's from AC_CONFIG_HEADERS([config.h])
We tell autoconf to build it so it doesn't have to put all the build flags on the command line.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 02/12] build: Nuke #ifdef HAVE_CONFIG_H cargo-cult
Quoted 8 lines · Chris Wilson
Quoting Daniel Vetter (2017-09-02 18:03:56)
Quoted 2 lines
We have it. Daniel Stone said it comes from the X11 transition to the modular build.
What? It's from
AC_CONFIG_HEADERS([config.h])We tell autoconf to build it so it doesn't have to put all the build flags on the command line.
Yes I know where it's from. What I mean is why do we include-guard this, and Daniel Stone said very old versions of X didn't have config.h (because they used imake or whatever the horror was again).
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 02/12] build: Nuke #ifdef HAVE_CONFIG_H cargo-cult
In reply to Daniel VetterQuoted 4 lines · Daniel Vetter
We have it. Daniel Stone said it comes from the X11 transition to the modular build.
Signed-off-by Daniel Vetter <[email protected]>
It's also used for Android builds, which lack the generated config.h.
But is this even used nowadays by anyone?
How we are going to deal with the Android.mk with the transition to meson? Can we just drop them?
Android, in recent releases, is shifting from Makefiles to Soong. anyway. <https://android.googlesource.com/platform/build/soong/>
Signature · 6 lines
Cheers, Arek _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 02/12] build: Nuke #ifdef HAVE_CONFIG_H cargo-cult
Quoted 8 lines · Arkadiusz Hiler
Quoted 4 lines · Daniel Vetter
We have it. Daniel Stone said it comes from the X11 transition to the modular build.
Signed-off-by Daniel Vetter <[email protected]>It's also used for Android builds, which lack the generated
config.h.
Quoted 7 lines
But is this even used nowadays by anyone?
How we are going to deal with the Android.mk with the transition to meson? Can we just drop them?
Android, in recent releases, is shifting from Makefiles to Soong. anyway. <https://android.googlesource.com/platform/build/soong/>
Looking at recent igt patches, we've stuffed all the fancy stuff (e.g. chamelium) into Makefile.am, not Makefile.sources. And no one updated the android build.
Judging from that, I think the android build is already firmly in bitrot territory :-/
So yeah the plan would be to just leave it there, until someone cares more. From a few googles it looks like meson might be able to cross-compile into an android environment, but it won't be able to get integrated into the android image build.
We could also try to generate the Makefile.sources files from special meson targets (probably using the configuration generation stuff and a few templates).
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 02/12] build: Nuke #ifdef HAVE_CONFIG_H cargo-cult
Quoted 21 lines · Daniel Vetter
Quoted 8 lines · Arkadiusz Hiler
Quoted 4 lines · Daniel Vetter
We have it. Daniel Stone said it comes from the X11 transition to the modular build.
Signed-off-by Daniel Vetter <[email protected]>It's also used for Android builds, which lack the generated
config.h.Quoted 7 lines
But is this even used nowadays by anyone?
How we are going to deal with the Android.mk with the transition to meson? Can we just drop them?
Android, in recent releases, is shifting from Makefiles to Soong. anyway. <https://android.googlesource.com/platform/build/soong/>
Looking at recent igt patches, we've stuffed all the fancy stuff (e.g. chamelium) into Makefile.am, not Makefile.sources. And no one updated the android build.
Quoted 7 lines
Judging from that, I think the android build is already firmly in bitrot territory :-/
So yeah the plan would be to just leave it there, until someone cares more. From a few googles it looks like meson might be able to cross-compile into an android environment, but it won't be able to get integrated into the android image build.
I am actually leaning towards getting rid of it completely from the tree, instead of making the illusion that Android is supported in any way.
If someone will care and pick up the maintenance, this should be easy enough to dig up from the history.
Signature · 1 line
Arek
Quoted 8 lines
We could also try to generate the Makefile.sources files from special meson targets (probably using the configuration generation stuff and a few templates).
-DanielSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 02/12] build: Nuke #ifdef HAVE_CONFIG_H cargo-cult
Quoted 11 lines · Arkadiusz Hiler
Quoted 10 lines · Daniel Vetter
Quoted 9 lines · Arkadiusz Hiler
Quoted 4 lines · Daniel Vetter
We have it. Daniel Stone said it comes from the X11 transition to the modular build.
Signed-off-by Daniel Vetter <[email protected]>It's also used for Android builds, which lack the generated
config.h.But is this even used nowadays by anyone?
We do use IGTs to test kernels used in Android. We do not use the latest version of IGT though as we are using one of older kernel versions.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
How we are going to deal with the Android.mk with the transition to meson? Can we just drop them?
Android, in recent releases, is shifting from Makefiles to Soong. anyway. <https://android.googlesource.com/platform/build/soong/>
Looking at recent igt patches, we've stuffed all the fancy stuff (e.g. chamelium) into Makefile.am, not Makefile.sources. And no one updated the android build.
We dont use/run chamelium tests - I guess we don't use any fancy stuff ;)
Quoted 3 lines
Quoted 3 lines
Judging from that, I think the android build is already firmly in bitrot territory :-/
I do have automated build for latest IGTs on android N and so far all builds are still passing.
Quoted 6 lines
Quoted 5 lines
So yeah the plan would be to just leave it there, until someone cares more. From a few googles it looks like meson might be able to cross-compile into an android environment, but it won't be able to get integrated into the android image build.
Quoted 7 lines
I am actually leaning towards getting rid of it completely from the tree, instead of making the illusion that Android is supported in any way.
If someone will care and pick up the maintenance, this should be easy enough to dig up from the history.
Is there no plan at all to support Android long term?
Thanks,
Radek
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 02/12] build: Nuke #ifdef HAVE_CONFIG_H cargo-cult
Quoted 24 lines · Radoslaw
Quoted 11 lines · Arkadiusz Hiler
Quoted 10 lines · Daniel Vetter
Quoted 9 lines · Arkadiusz Hiler
Quoted 4 lines · Daniel Vetter
We have it. Daniel Stone said it comes from the X11 transition to the modular build.
Signed-off-by Daniel Vetter <[email protected]>It's also used for Android builds, which lack the generated
config.h.But is this even used nowadays by anyone?
We do use IGTs to test kernels used in Android. We do not use the latest version of IGT though as we are using one of older kernel versions.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
How we are going to deal with the Android.mk with the transition to meson? Can we just drop them?
Android, in recent releases, is shifting from Makefiles to Soong. anyway. <https://android.googlesource.com/platform/build/soong/>
Looking at recent igt patches, we've stuffed all the fancy stuff (e.g. chamelium) into Makefile.am, not Makefile.sources. And no one updated the android build.
Quoted 6 lines
We dont use/run chamelium tests - I guess we don't use any fancy stuff ;)
Quoted 3 lines
Quoted 3 lines
Judging from that, I think the android build is already firmly in bitrot territory :-/
I do have automated build for latest IGTs on android N and so far all builds are still passing.
**If you want to help maintaining the Android build,** I would be happy to help you with making pre-merge testing out of what you have and plugging the results into patchwork (and mailing list).
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
So yeah the plan would be to just leave it there, until someone cares more. From a few googles it looks like meson might be able to cross-compile into an android environment, but it won't be able to get integrated into the android image build.
Quoted 8 lines
Quoted 7 lines
I am actually leaning towards getting rid of it completely from the tree, instead of making the illusion that Android is supported in any way.
If someone will care and pick up the maintenance, this should be easy enough to dig up from the history.
Is there no plan at all to support Android long term?
On IGT side of things? Not to my knowledge. We are not building it or running on anything.
We just need someone who cares, and have resources to keep this maintained.
Signature · 6 lines
Cheers, Arek _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/12 build: use HAVE_LIBGEN_H consistently
In reply to Daniel VetterAlso, we are _GNU_SOURCE, so simplify the conditions accordingly.
The next patch will remove _GNU_SOURCE everywhere else.
--- lib/drmtest.c | 4 +--- lib/igt_aux.c | 4 +--- lib/igt_core.c | 4 +--- lib/ioctl_wrappers.c | 4 +--- lib/sw_sync.c | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-)
lib/drmtest.c +1 -3
@@ -26,9 +26,7 @@* */ -#ifndef ANDROID -#define _GNU_SOURCE -#else +#ifdef HAVE_LIBGEN_H #include <libgen.h> #endif #include <stdio.h>
lib/igt_aux.c +1 -3
@@ -26,9 +26,7 @@* */ -#ifndef ANDROID -#define _GNU_SOURCE -#else +#ifdef HAVE_LIBGEN_H #include <libgen.h> #endif #include <stdio.h>
lib/igt_core.c +1 -3
@@ -26,9 +26,7 @@* */ -#ifndef ANDROID -#define _GNU_SOURCE -#else +#ifdef HAVE_LIBGEN_H #include <libgen.h> #endif #include <stdio.h>
lib/ioctl_wrappers.c +1 -3
@@ -26,9 +26,7 @@* */ -#ifndef ANDROID -#define _GNU_SOURCE -#else +#ifdef HAVE_LIBGEN_H #include <libgen.h> #endif #include <stdio.h>
lib/sw_sync.c +1 -3
@@ -24,9 +24,7 @@* Robert Foss <[email protected]> */ -#ifndef ANDROID -#define _GNU_SOURCE -#else +#ifdef HAVE_LIBGEN_H #include <libgen.h> #endif #include <fcntl.h>
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/12 build: remove _GNU_SOURCE from source files
In reply to Daniel VetterWe are, the build system takes care of that.
--- benchmarks/gem_exec_tracer.c | 2 -- benchmarks/gem_latency.c | 1 - benchmarks/gem_syslatency.c | 2 -- lib/igt_fb.c | 1 - lib/igt_vgem.c | 2 -- lib/tests/igt_exit_handler.c | 1 - tests/core_get_client_auth.c | 1 - tests/core_setmaster_vs_auth.c | 1 - tests/drm_import_export.c | 1 - tests/drv_missed_irq.c | 1 - tests/gem_fenced_exec_thrash.c | 2 -- tests/gem_flink_race.c | 1 - tests/gem_mmap_gtt.c | 1 - tests/gem_mmap_wc.c | 1 - tests/gem_persistent_relocs.c | 1 - tests/gem_reloc_vs_gpu.c | 1 - tests/gem_reset_stats.c | 1 - tests/gem_streaming_writes.c | 1 - tests/gem_workarounds.c | 1 - tests/kms_cursor_legacy.c | 1 - tests/pm_rc6_residency.c | 1 - tests/pm_rps.c | 1 - tests/prime_mmap.c | 1 - tests/prime_self_import.c | 1 - tools/aubdump.c | 2 -- tools/intel_audio_dump.c | 1 - tools/intel_dump_decode.c | 1 - tools/intel_error_decode.c | 1 - tools/intel_framebuffer_dump.c | 1 - tools/intel_gpu_frequency.c | 1 - tools/intel_guc_logger.c | 1 - tools/intel_l3_parity.c | 1 - tools/intel_l3_udev_listener.c | 3 --- 33 files changed, 40 deletions(-)
benchmarks/gem_exec_tracer.c +0 -2
@@ -21,8 +21,6 @@* IN THE SOFTWARE. */ -#define _GNU_SOURCE/* for RTLD_NEXT */ -#include <stdlib.h> #include <stdio.h> #include <string.h>
benchmarks/gem_latency.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include <pthread.h> #include "igt.h"
benchmarks/gem_syslatency.c +0 -2
@@ -22,8 +22,6 @@* */ -#define _GNU_SOURCE -#include "igt.h" #include <unistd.h> #include <stdlib.h>
lib/igt_fb.c +0 -1
@@ -25,7 +25,6 @@* Damien Lespiau <[email protected]> */ -#define _GNU_SOURCE#include <stdio.h> #include <math.h>
lib/igt_vgem.c +0 -2
@@ -21,8 +21,6 @@* IN THE SOFTWARE. */ -#define _GNU_SOURCE -#include "igt.h" #include "igt_vgem.h"
lib/tests/igt_exit_handler.c +0 -1
@@ -21,7 +21,6 @@* IN THE SOFTWARE. */ -#define _GNU_SOURCE#include <assert.h> #include <unistd.h> #include <fcntl.h>
tests/core_get_client_auth.c +0 -1
@@ -32,7 +32,6 @@* Oh dear, libva, why do you do such funny things? */ -#define _GNU_SOURCE#include "igt.h" #include <unistd.h> #include <stdlib.h>
tests/core_setmaster_vs_auth.c +0 -1
@@ -33,7 +33,6 @@* trying to authenticate a client against the wrong master. */ -#define _GNU_SOURCE#include "igt.h" #include <unistd.h> #include <stdlib.h>
tests/drm_import_export.c +0 -1
@@ -24,7 +24,6 @@* Daniel Vetter <[email protected]> */ -#define _GNU_SOURCE#include "igt.h" #include <stdio.h> #include <sys/types.h>
tests/drv_missed_irq.c +0 -1
@@ -22,7 +22,6 @@* */ -#define _GNU_SOURCE#include <sched.h> #include "igt.h"
tests/gem_fenced_exec_thrash.c +0 -2
@@ -25,8 +25,6 @@* */ -#define _GNU_SOURCE -#include "igt.h" #include <stdlib.h> #include <sys/ioctl.h>
tests/gem_flink_race.c +0 -1
@@ -24,7 +24,6 @@* Daniel Vetter <[email protected]> */ -#define _GNU_SOURCE#include "igt.h" #include <sys/ioctl.h> #include <stdlib.h>
tests/gem_mmap_gtt.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include <unistd.h> #include <stdlib.h> #include <stdio.h>
tests/gem_mmap_wc.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include "igt.h" #include <unistd.h> #include <stdlib.h>
tests/gem_persistent_relocs.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include "igt.h" #include <stdlib.h> #include <stdio.h>
tests/gem_reloc_vs_gpu.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include "igt.h" #include <stdlib.h> #include <stdio.h>
tests/gem_reset_stats.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include "igt.h" #include "igt_sysfs.h" #include <limits.h>
tests/gem_streaming_writes.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include "igt.h" #include <unistd.h> #include <stdlib.h>
tests/gem_workarounds.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include "igt.h" #include <fcntl.h>
tests/kms_cursor_legacy.c +0 -1
@@ -22,7 +22,6 @@* */ -#define _GNU_SOURCE#include <sched.h> #include <sys/poll.h>
tests/pm_rc6_residency.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include "igt.h" #include "igt_sysfs.h" #include <stdio.h>
tests/pm_rps.c +0 -1
@@ -26,7 +26,6 @@* */ -#define _GNU_SOURCE#include "igt.h" #include <stdio.h> #include <stdlib.h>
tests/prime_mmap.c +0 -1
@@ -29,7 +29,6 @@/* * Testcase: Check whether mmap()ing dma-buf works */ -#define _GNU_SOURCE#include <unistd.h> #include <stdlib.h> #include <stdio.h>
tests/prime_self_import.c +0 -1
@@ -31,7 +31,6 @@* ... but with different fds, i.e. the wayland usecase. */ -#define _GNU_SOURCE#include "igt.h" #include <unistd.h> #include <stdlib.h>
tools/aubdump.c +0 -2
@@ -21,8 +21,6 @@* IN THE SOFTWARE. */ -#define _GNU_SOURCE/* for RTLD_NEXT */ -#include <stdlib.h> #include <stdio.h> #include <string.h>
tools/intel_audio_dump.c +0 -1
@@ -26,7 +26,6 @@* */ -#define _GNU_SOURCE#include <unistd.h> #include <stdlib.h> #include <stdio.h>
tools/intel_dump_decode.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include <stdint.h> #include <stdio.h> #include <stdlib.h>
tools/intel_error_decode.c +0 -1
@@ -38,7 +38,6 @@* decode, but never crash in the process. */ -#define _GNU_SOURCE#include <stdbool.h> #include <stdio.h> #include <stdlib.h>
tools/intel_framebuffer_dump.c +0 -1
@@ -26,7 +26,6 @@* Read back all the KMS framebuffers attached to the CRTC and record as PNG. */ -#define _GNU_SOURCE#include <stdint.h> #include <sys/types.h> #include <sys/mman.h>
tools/intel_gpu_frequency.c +0 -1
@@ -46,7 +46,6 @@* intel_gpu_frequency -d */ -#define _GNU_SOURCE#include <assert.h> #include <getopt.h> #include <stdio.h>
tools/intel_guc_logger.c +0 -1
@@ -1,5 +1,4 @@ -#define _GNU_SOURCE/* For using O_DIRECT */ #include <inttypes.h> #include <stdio.h> #include <fcntl.h>
tools/intel_l3_parity.c +0 -1
@@ -25,7 +25,6 @@* */ -#define _GNU_SOURCE#include <sys/types.h> #include <sys/stat.h> #include <assert.h>
tools/intel_l3_udev_listener.c +0 -3
@@ -25,9 +25,6 @@#ifdef HAVE_UDEV #include <libudev.h> -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif #include <stdio.h> #include <stdlib.h> #include <string.h>
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/12 tests/gem_spin_batch: Fix warning
In reply to Daniel Vetter--- tests/gem_spin_batch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/gem_spin_batch.c +1 -1
@@ -48,7 +48,7 @@ static void spin(int fd, unsigned int engine, unsigned int timeout_sec)igt_spin_batch_set_timeout (spin, timeout_100ms -igt_nsec_elapsed (&itv));gem_sync (fd, spin->handle); -igt_debug ("loop %d: interval=%fms (target 100ms), elapsed %fms\n" , +igt_debug ("loop %lu: interval=%fms (target 100ms), elapsed %fms\n" , loops,igt_nsec_elapsed (&itv) *1e-6 ,igt_nsec_elapsed (&tv) *1e-6 );
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 05/12] tests/gem_spin_batch: Fix warning
Quoted 1 line · Daniel Vetter
Signed-off-by Daniel Vetter <[email protected]>
1-5 are:
My meson branch has some stuff you probably want to squash into your meson build system commit.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/12 lib: prefix frame_dump_path
In reply to Daniel VetterJust a bit of ocd for anything non-static.
--- lib/igt_core.c | 12 ++++++------ lib/igt_core.h | 2 +- lib/igt_frame.c | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-)
lib/igt_core.c +6 -6
@@ -295,7 +295,7 @@ static pthread_mutex_t log_buffer_mutex = PTHREAD_MUTEX_INITIALIZER;GKeyFile *igt_key_file;#endif -char *frame_dump_path; +char *igt_frame_dump_path;const char *igt_test_name (void ) {
@@ -650,10 +650,10 @@ static void common_init_config(void)g_clear_error (&error); -if (!frame_dump_path) - frame_dump_path =g_key_file_get_string (igt_key_file,"Common" , -"FrameDumpPath" , - &error); +if (!igt_frame_dump_path) + igt_frame_dump_path = +g_key_file_get_string (igt_key_file,"Common" , +"FrameDumpPath" , &error);g_clear_error (&error);
@@ -694,7 +694,7 @@ static void common_init_env(void) igt_log_level =IGT_LOG_NONE ; } - frame_dump_path =getenv ("IGT_FRAME_DUMP_PATH" ); + igt_frame_dump_path =getenv ("IGT_FRAME_DUMP_PATH" ); } static int common_init(int *argc, char **argv,
lib/igt_core.h +1 -1
@@ -50,7 +50,7 @@ extern const char* __igt_test_description __attribute__((weak));extern bool __igt_plain_output;extern GKeyFile *igt_key_file; -extern char *frame_dump_path; +extern char *igt_frame_dump_path;/** * IGT_TEST_DESCRIPTION:
lib/igt_frame.c +5 -5
@@ -53,7 +53,7 @@*/ bool igt_frame_dump_is_enabled (void ) { -return frame_dump_path !=NULL ; +return igt_frame_dump_path !=NULL ; } static void igt_write_frame_to_png(cairo_surface_t *surface, int fd,
@@ -70,11 +70,11 @@ static void igt_write_frame_to_png(cairo_surface_t *surface, int fd,if (suffix)snprintf (path,PATH_MAX ,"%s/frame-%s-%s-%s-%s.png" , - frame_dump_path, test_name, subtest_name, qualifier, + igt_frame_dump_path, test_name, subtest_name, qualifier, suffix);else snprintf (path,PATH_MAX ,"%s/frame-%s-%s-%s.png" , - frame_dump_path, test_name, subtest_name, qualifier); + igt_frame_dump_path, test_name, subtest_name, qualifier);igt_debug ("Dumping %s frame to %s...\n" , qualifier, path);
@@ -122,10 +122,10 @@ void igt_write_compared_frames_to_png(cairo_surface_t *reference,if (id)snprintf (path,PATH_MAX ,"%s/frame-%s-%s-%s.txt" , - frame_dump_path, test_name, subtest_name, id); + igt_frame_dump_path, test_name, subtest_name, id);else snprintf (path,PATH_MAX ,"%s/frame-%s-%s.txt" , - frame_dump_path, test_name, subtest_name); + igt_frame_dump_path, test_name, subtest_name); fd =open (path,O_WRONLY |O_CREAT |O_TRUNC ,0644 );igt_assert (fd >=0 );
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/12 lib: clean up header includes
In reply to Daniel VetterJust a bit of OCD, I like it when connections within library modules are a bit more obvious. igt.h is ok for tests, but let's use individual include lines for libraries consistently.
Also order standard includes before igt ones.
--- lib/igt_alsa.c | 3 ++- lib/igt_alsa.h | 1 - lib/igt_audio.c | 3 ++- lib/igt_audio.h | 1 - lib/igt_chamelium.c | 6 +++++- lib/igt_chamelium.h | 6 +++++- lib/igt_dummyload.c | 11 +++++++++-- lib/igt_frame.c | 3 ++- lib/igt_frame.h | 1 - lib/igt_gvt.c | 10 +++++----- lib/igt_kmod.c | 6 +++--- lib/igt_sysfs.h | 1 + lib/igt_vgem.c | 10 +++++++--- lib/igt_vgem.h | 1 + 14 files changed, 42 insertions(+), 21 deletions(-)
lib/igt_alsa.c +2 -1
@@ -28,7 +28,8 @@#include <alsa/asoundlib.h> -#include "igt.h" +#include "igt_alsa.h" +#include "igt_core.h" #define HANDLES_MAX 8
lib/igt_alsa.h +0 -1
@@ -29,7 +29,6 @@#include "config.h" -#include "igt.h" #include <stdbool.h> struct alsa ;
lib/igt_audio.c +2 -1
@@ -29,7 +29,8 @@#include <math.h> #include <gsl/gsl_fft_real.h> -#include "igt.h" +#include "igt_audio.h" +#include "igt_core.h" #define FREQS_MAX 8
lib/igt_audio.h +0 -1
@@ -29,7 +29,6 @@#include "config.h" -#include "igt.h" #include <stdbool.h> struct audio_signal ;
lib/igt_chamelium.c +5 -1
@@ -35,7 +35,11 @@#include <pixman.h> #include <cairo.h> -#include "igt.h" +#include "igt_chamelium.h" +#include "igt_core.h" +#include "igt_aux.h" +#include "igt_kms.h" +#include "igt_frame.h" /** * SECTION:igt_chamelium
lib/igt_chamelium.h +5 -1
@@ -28,8 +28,12 @@#include "config.h" -#include "igt.h" #include <stdbool.h> +#include <xf86drmMode.h> + +#include "igt_debugfs.h" + +struct igt_fb ;struct chamelium ;struct chamelium_port ;
lib/igt_dummyload.c +9 -2
@@ -22,11 +22,18 @@* */ -#include "igt.h" -#include "igt_dummyload.h" #include <time.h> #include <signal.h> #include <sys/syscall.h> +#include <sys/mman.h> + +#include <i915_drm.h> + +#include "igt_dummyload.h" +#include "igt_gt.h" +#include "intel_batchbuffer.h" +#include "intel_chipset.h" +#include "ioctl_wrappers.h" /** * SECTION:igt_dummyload
lib/igt_frame.c +2 -1
@@ -32,7 +32,8 @@#include <gsl/gsl_statistics_double.h> #include <gsl/gsl_fit.h> -#include "igt.h" +#include "igt_frame.h" +#include "igt_core.h" /** * SECTION:igt_frame
lib/igt_frame.h +0 -1
@@ -29,7 +29,6 @@#include "config.h" -#include "igt.h" #include <stdbool.h> bool igt_frame_dump_is_enabled (void );
lib/igt_gvt.c +5 -5
@@ -21,16 +21,16 @@* IN THE SOFTWARE. */ -#include "igt.h" -#include "igt_gvt.h" -#include "igt_sysfs.h" -#include "igt_kmod.h" -#include <signal.h> #include <dirent.h> #include <unistd.h> #include <fcntl.h> +#include "igt_gvt.h" +#include "igt_sysfs.h" +#include "igt_kmod.h" +#include "drmtest.h" +/** * SECTION:igt_gvt * @short_description: Graphics virtualization technology library
lib/igt_kmod.c +3 -3
@@ -21,13 +21,13 @@* IN THE SOFTWARE. */ -#include "igt.h" +#include <signal.h> +#include <errno.h> +#include "igt_core.h" #include "igt_sysfs.h" #include "igt_kmod.h" -#include <signal.h> -/** * SECTION:igt_kmod * @short_description: Wrappers around libkmod for module loading/unloading
lib/igt_sysfs.h +1 -0
@@ -26,6 +26,7 @@#define __IGT_SYSFS_H__#include <stdbool.h> +#include <stdarg.h> int igt_sysfs_open (int device,int *idx);int igt_sysfs_open_parameters (int device);
lib/igt_vgem.c +7 -3
@@ -21,10 +21,14 @@* IN THE SOFTWARE. */ -#include "igt.h" -#include "igt_vgem.h" -#include <sys/mman.h> +#include <xf86drm.h> +#include <xf86drmMode.h> +#include <errno.h> + +#include "igt_vgem.h" +#include "igt_core.h" +#include "ioctl_wrappers.h" /** * SECTION:igt_vgem
lib/igt_vgem.h +1 -0
@@ -25,6 +25,7 @@#define IGT_VGEM_H #include <stdint.h> +#include <stdbool.h> struct vgem_bo {uint32_t handle;
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/12 tests/igt_command_line.sh: Allow testing individual tests
In reply to Daniel Vettermeso will use this to run the tests for all testcases in parallel, for great speedup!
--- tests/igt_command_line.sh | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-)
tests/igt_command_line.sh +26 -13
@@ -37,24 +37,16 @@ fi # Manually running this script is possible in the source root or the # tests directory. -TESTLISTFILE="$tests_dir/test-list.txt" -if [ ! -r "$TESTLISTFILE" ]; then - tests_dir="tests" - TESTLISTFILE="$tests_dir/test-list.txt" -fi - -TESTLIST=`cat $TESTLISTFILE` -if [ $? -ne 0 ]; then - echo "Error: Could not read test lists" - exit 99 -fi - fail () { echo "FAIL: $1" exit 1 } -for test in $TESTLIST; do +function check_test () { + local test + + test=$1 + if [ "$test" = "TESTLIST" -o "$test" = "END" ]; then continue fi
@@ -105,4 +97,25 @@ for test in $TESTLIST; do # check invalid subtest handling echo " Checking invalid subtest handling..." ./$test --run-subtest invalid-subtest > /dev/null 2>&1 && fail $test +} + +TESTLISTFILE="$tests_dir/test-list.txt" +if [ ! -r "$TESTLISTFILE" ]; then + tests_dir="tests" + TESTLISTFILE="$tests_dir/test-list.txt" +fi + +TESTLIST=`cat $TESTLISTFILE` +if [ $? -ne 0 ]; then + echo "Error: Could not read test lists" + exit 99 +fi + +if [[ "$1" != "" ]] ; then + check_test $1 + exit 0 +fi + +for test in $TESTLIST; do + check_test $test done
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 9/12 lib/uwildmat: Use include paths
In reply to Daniel Vettermeson runs gcc from where meson.build that includes those files is, which means we need to add the directory ourselves.
For automake it doesn't matter, so let's just do it for simplicity.
--- lib/uwildmat/uwildmat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/uwildmat/uwildmat.c +1 -1
@@ -95,7 +95,7 @@#include <string.h> #include <stdint.h> -#include "uwildmat.h" +#include "uwildmat/uwildmat.h" #define ABORT -1
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 10/12 demos: remove
In reply to Daniel VetterThe igt testcase themselves contain plenty of demos, libdrm also contains a bunch of demos, this here just bitrots.
So let's remove it.
--- Makefile.am | 2 +- demos/.gitignore | 1 - demos/Android.mk | 32 -- demos/Makefile.am | 12 - demos/Makefile.sources | 7 - demos/intel_sprite_on.c | 960 ------------------------------------------------ 6 files changed, 1 insertion(+), 1013 deletions(-) delete mode 100644 demos/.gitignore delete mode 100644 demos/Android.mk delete mode 100644 demos/Makefile.am delete mode 100644 demos/Makefile.sources delete mode 100644 demos/intel_sprite_on.c
Makefile.am +1 -1
@@ -36,7 +36,7 @@ if BUILD_SHADER_DEBUGGER SUBDIRS += debugger endif -SUBDIRS += overlay demos benchmarks +SUBDIRS += overlay benchmarks endif SUBDIRS += docs
demos/.gitignore deleted +0 -1
@@ -1 +0,0 @@ -intel_sprite_on
demos/Android.mk deleted +0 -32
@@ -1,32 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -#================# - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := $(demos_prog_lists) - -ifeq ($(HAVE_LIBDRM_INTEL),true) - LOCAL_SRC_FILES += $(LIBDRM_INTEL_BIN) -endif - -LOCAL_CFLAGS += -DHAVE_TERMIOS_H -LOCAL_CFLAGS += -DANDROID -UNDEBUG -LOCAL_CFLAGS += -std=gnu99 -# Excessive complaining for established cases. Rely on the Linux version warnings. -LOCAL_CFLAGS += -Wno-sign-compare - -LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \ - $(LOCAL_PATH)/../lib/stubs/drm/ - -LOCAL_MODULE := intel_sprite_on - -LOCAL_MODULE_TAGS := optional - -LOCAL_STATIC_LIBRARIES := libintel_gpu_tools - -LOCAL_SHARED_LIBRARIES := libdrm - -include $(BUILD_EXECUTABLE) - -#================#
demos/Makefile.am deleted +0 -12
@@ -1,12 +0,0 @@ -include Makefile.sources - -bin_PROGRAMS = $(demos_prog_list) - -if HAVE_LIBDRM_INTEL - bin_PROGRAMS += $(LIBDRM_INTEL_BIN) -endif - -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \ - $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) $(WERROR_CFLAGS) -LDADD = $(top_builddir)/lib/libigt.la
demos/Makefile.sources deleted +0 -7
@@ -1,7 +0,0 @@ -demos_prog_list = \ - $(NULL) - -LIBDRM_INTEL_BIN = \ - intel_sprite_on \ - $(NULL) -
demos/intel_sprite_on.c deleted +0 -960
960 lines not on this page · raw message
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 11/12 assembler/test: Prep work for meson
In reply to Daniel VetterAgain we want to be able to run each testcase individually.
Also, we need to make sure the target directory for the temp files exists - meson always builds with a build-dir outside of the source tree.
--- assembler/test/run-test.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
assembler/test/run-test.sh +12 -4
@@ -3,9 +3,17 @@ SRCDIR=${srcdir-`pwd`} BUILDDIR=${top_builddir-`pwd`} -${BUILDDIR}/intel-gen4asm -o TEST.out $SRCDIR/TEST.g4a -if cmp TEST.out ${SRCDIR}/TEST.expected 2> /dev/null; then : ; else - echo "Output comparison for TEST" - diff -u ${SRCDIR}/TEST.expected TEST.out +test="TEST" + +if [[ "$1" != "" ]] ; then + test="$1" +fi + +test -d ${BUILDDIR}/test || mkdir ${BUILDDIR}/test/ + +${BUILDDIR}/intel-gen4asm -o ${BUILDDIR}/${test}.out $SRCDIR/${test}.g4a +if cmp ${BUILDDIR}/${test}.out ${SRCDIR}/${test}.expected 2> /dev/null; then : ; else + echo "Output comparison for ${test}" + diff -u ${SRCDIR}/${test}.expected ${test}.out exit 1; fi
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 12/12 RFC: meson build system support
In reply to Daniel VetterWhy?
Because it's fast.
Like really, really fast.
Some data (from a snb laptop, so rather lower-powered):
- Incremental build after $ touch lib/igt_core.c with meson: 0.6s It notices that the symbol list of the libigt.so hasn't changed and doesn't bother re-linking the almost 300 binaries we have. make -j 6 for the same scenario takes 44s.
- Incremental build with nothing changed: make: 0.7s, meson: 0.2s This means stuff like --disable-git-hash is entirely pointless with meson, it's faster than a make ever can be (with 0.6s).
- Reconfigure stage: ninja reconfigure 0.8s vs. ./configure 8.6s)
- Running tests, after a full build: ninja test 6s vs. make check 24s
- Full build (i.e. including ./autogen.sh respectively meson build), including tests, from a pristine git checkout. automake 2m49s vs. meson 44s.
TODO:
- cmdline options
- gcc warnings, debug build, how does that work?
- man pages
- gtkdoc
--- .gitignore | 1 + assembler/meson.build | 73 ++++++++++ benchmarks/meson.build | 36 +++++ lib/meson.build | 166 ++++++++++++++++++++++ lib/prepend_log_domain.sh | 8 ++ lib/tests/meson.build | 34 +++++ lib/version.h.in | 1 + meson.build | 105 ++++++++++++++ overlay/meson.build | 59 ++++++++ tests/generate_testlist.sh | 10 ++ tests/meson.build | 290 +++++++++++++++++++++++++++++++++++++++ tools/meson.build | 59 ++++++++ tools/null_state_gen/meson.build | 15 ++ 13 files changed, 857 insertions(+) create mode 100644 assembler/meson.build create mode 100644 benchmarks/meson.build create mode 100644 lib/meson.build create mode 100755 lib/prepend_log_domain.sh create mode 100644 lib/tests/meson.build create mode 100644 lib/version.h.in create mode 100644 meson.build create mode 100644 overlay/meson.build create mode 100755 tests/generate_testlist.sh create mode 100644 tests/meson.build create mode 100644 tools/meson.build create mode 100644 tools/null_state_gen/meson.build
.gitignore +1 -0
@@ -93,3 +93,4 @@ intel-gpu-tools-*/ piglit results +build
assembler/meson.build new file +73 -0
73 lines not on this page · raw message
benchmarks/meson.build new file +36 -0
@@ -0,0 +1,36 @@ +benchmark_progs = [ + 'gem_blt', + 'gem_busy', + 'gem_create', + 'gem_exec_ctx', + 'gem_exec_fault', + 'gem_exec_nop', + 'gem_exec_reloc', + 'gem_exec_trace', + 'gem_latency', + 'gem_mmap', + 'gem_prw', + 'gem_set_domain', + 'gem_syslatency', + 'gem_wsim', + 'kms_vblank', + 'prime_lookup', + 'vgem_mmap', +] + +if libdrm_intel.found() + benchmark_progs += [ + 'intel_upload_blit_large', + 'intel_upload_blit_large_gtt', + 'intel_upload_blit_large_map', + 'intel_upload_blit_small', + 'gem_userptr_benchmark', + ] +endif + +foreach prog : benchmark_progs + # FIXME meson doesn't like binaries with the same name + # meanwhile just suffix with _bench + executable(prog + '_bench', prog + '.c', + dependencies : test_deps) +endforeach
lib/meson.build new file +166 -0
166 lines not on this page · raw message
lib/prepend_log_domain.sh new file +8 -0
@@ -0,0 +1,8 @@ +#!/bin/bash + +input=$1 +output=$2 +basename=$(basename $1 .c) + +echo "#define IGT_LOG_DOMAIN \"$basename\"" > $output +cat $input >> $output
lib/tests/meson.build new file +34 -0
@@ -0,0 +1,34 @@ +lib_tests = [ + 'igt_fork_helper', + 'igt_list_only', + 'igt_simulation', + 'igt_stats', + 'igt_segfault', + 'igt_subtest_group', + 'igt_assert', + 'igt_exit_handler', + 'igt_hdmi_inject', + 'igt_can_fail', + 'igt_can_fail_simple', +] + +lib_fail_tests = [ + 'igt_no_exit', + 'igt_no_exit_list_only', + 'igt_no_subtest', + 'igt_simple_test_subtests', + 'igt_timeout', + 'igt_invalid_subtest_name', +] + +foreach lib_test : lib_tests + exec = executable(lib_test, lib_test + '.c', install : true, + dependencies : igt_deps) + test('lib: ' + lib_test, exec) +endforeach + +foreach lib_test : lib_fail_tests + exec = executable(lib_test, lib_test + '.c', install : true, + dependencies : igt_deps) + test('lib: ' + lib_test, exec, should_fail : true) +endforeach
lib/version.h.in new file +1 -0
@@ -0,0 +1 @@ +#define IGT_GIT_SHA1 "@VCS_TAG@"
meson.build new file +105 -0
105 lines not on this page · raw message
overlay/meson.build new file +59 -0
59 lines not on this page · raw message
tests/generate_testlist.sh new file +10 -0
@@ -0,0 +1,10 @@ +#!/bin/bash + +echo TESTLIST > $MESON_BUILD_ROOT/tests/test-list.txt + +while [[ $# -gt 0 ]] ; do + echo $1 >> $MESON_BUILD_ROOT/tests/test-list.txt + shift +done + +echo END TESTLIST >> $MESON_BUILD_ROOT/tests/test-list.txt
tests/meson.build new file +290 -0
290 lines not on this page · raw message
tools/meson.build new file +59 -0
59 lines not on this page · raw message
tools/null_state_gen/meson.build new file +15 -0
@@ -0,0 +1,15 @@ +intel_null_state_gen_src = [ + 'intel_batchbuffer.c', + 'intel_renderstate_gen6.c', + 'intel_renderstate_gen7.c', + 'intel_renderstate_gen8.c', + 'intel_renderstate_gen9.c', + 'intel_null_state_gen.c', +] + +intel_null_state_gen = executable('intel_null_state_gen', + intel_null_state_gen_src, dependencies : igt_deps, + install : false) + +# FIXME actual null_state generation. We probably want to push the the copyright +# header generation into intel_null_state_gen for simplicity
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 12/12] RFC: meson build system support
Quoted 19 lines · Daniel Vetter
Why?
Because it's fast.
Like really, really fast.
Some data (from a snb laptop, so rather lower-powered):
- Incremental build after $ touch
lib/igt_core.cwith meson: 0.6s It notices that the symbol list of the libigt.so hasn't changed and doesn't bother re-linking the almost 300 binaries we have. make -j 6 for the same scenario takes 44s.- Incremental build with nothing changed: make: 0.7s, meson: 0.2s This means stuff like --disable-git-hash is entirely pointless with meson, it's faster than a make ever can be (with 0.6s).
- Reconfigure stage: ninja reconfigure 0.8s vs. ./configure 8.6s)
Quoted 8 lines
- Running tests, after a full build: ninja test 6s vs. make check 24s
- Full build (i.e. including ./autogen.sh respectively meson build), including tests, from a pristine git checkout. automake 2m49s vs. meson 44s.
TODO:
- cmdline options
Apparently this isn't how meson is done, but I guess we could do options to disable chamelium and similar stuff.
Quoted 2 lines
- gcc warnings, debug build, how does that work?
- man pages
man pages and gcc warnings are now done, with the latest set of patches from Eric and me.
Quoted 1 line
- gtkdoc
Working on this, probably hitting some bug in the meson gtkdoc support right now.
Another thing I totally didn't tackle is install support. Half the stuff is probably missing or in the wrong place right now.
Also, for convenience, the entire pile on fd.o:
https://cgit.freedesktop.org/~danvet/intel-gpu-tools/log/?h=stuff
I've mentioned that this stuff is fast, right?
:-)
Cheers, Daniel
Quoted 973 lines
Cc Ville Syrjälä <[email protected]>Cc Eric Anholt <[email protected]>Cc Daniel Stone <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- .gitignore | 1 + assembler/meson.build | 73 ++++++++++ benchmarks/meson.build | 36 +++++ lib/meson.build | 166 ++++++++++++++++++++++ lib/prepend_log_domain.sh | 8 ++ lib/tests/meson.build | 34 +++++ lib/version.h.in | 1 + meson.build | 105 ++++++++++++++ overlay/meson.build | 59 ++++++++ tests/generate_testlist.sh | 10 ++ tests/meson.build | 290 +++++++++++++++++++++++++++++++++++++++ tools/meson.build | 59 ++++++++ tools/null_state_gen/meson.build | 15 ++ 13 files changed, 857 insertions(+) create mode 100644 assembler/meson.build create mode 100644 benchmarks/meson.build create mode 100644 lib/meson.build create mode 100755 lib/prepend_log_domain.sh create mode 100644 lib/tests/meson.build create mode 100644 lib/version.h.in create mode 100644 meson.build create mode 100644 overlay/meson.build create mode 100755 tests/generate_testlist.sh create mode 100644 tests/meson.build create mode 100644 tools/meson.build create mode 100644 tools/null_state_gen/meson.build.gitignore +1
-0@@ -93,3 +93,4 @@ intel-gpu-tools-*/ piglit results +buildassembler/meson.build new file +73
-0@@ -0,0 +1,73 @@ +lib_brw_src = [ + 'brw_context.c', + 'brw_disasm.c', + 'brw_eu.c', + 'brw_eu_compact.c', + 'brw_eu_debug.c', + 'brw_eu_emit.c', + 'brw_eu_util.c', + 'gen8_disasm.c', + 'gen8_instruction.c', + 'ralloc.c', +] + +lib_brw = shared_library('brw', lib_brw_src, + dependencies : igt_deps) + +flex = find_program('flex') +bison = find_program('bison') + +lgen = generator(flex, + output : '@[email protected]', + arguments : ['-o', '@OUTPUT@', '@INPUT@']) + +lfiles = lgen.process('lex.l') + +pgen = generator(bison, + output : ['@[email protected]', '@[email protected]'], + arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']) + +pfiles = pgen.process('gram.y') + +executable('intel-gen4asm', 'main.c', lfiles, pfiles, link_with : lib_brw) + +executable('intel-gen4disasm', 'disasm-main.c', link_with : lib_brw) + +gen4asm_testcases = [ + 'test/mov', + 'test/frc', + 'test/rndd', + 'test/rndu', + 'test/rnde', + 'test/rnde-intsrc', + 'test/rndz', + 'test/lzd', + 'test/not', + 'test/immediate', +] + +# Those tests were already failing when the assembler was imported from +# the intel-gen4asm git repository: +# http://cgit.freedesktop.org/xorg/app/intel-gen4asm/ +# We disable them "for now" as a workaround to be able to release i-g-t +gen4asm_testcases_broken = [ + 'test/declare', + 'test/jmpi', + 'test/if', + 'test/iff', + 'test/while', + 'test/else', + 'test/break', + 'test/cont', + 'test/halt', + 'test/wait', + 'test/endif', +] + +test_runner = find_program('test/run-test.sh') +foreach testcase : gen4asm_testcases + test('assembler: ' + testcase, test_runner, + args : testcase, + env : [ 'srcdir=' + meson.current_source_dir(), + 'top_builddir=' + meson.current_build_dir()]) +endforeachbenchmarks/meson.build new file +36
-0@@ -0,0 +1,36 @@ +benchmark_progs = [ + 'gem_blt', + 'gem_busy', + 'gem_create', + 'gem_exec_ctx', + 'gem_exec_fault', + 'gem_exec_nop', + 'gem_exec_reloc', + 'gem_exec_trace', + 'gem_latency', + 'gem_mmap', + 'gem_prw', + 'gem_set_domain', + 'gem_syslatency', + 'gem_wsim', + 'kms_vblank', + 'prime_lookup', + 'vgem_mmap', +] + +if libdrm_intel.found() + benchmark_progs += [ + 'intel_upload_blit_large', + 'intel_upload_blit_large_gtt', + 'intel_upload_blit_large_map', + 'intel_upload_blit_small', + 'gem_userptr_benchmark', + ] +endif + +foreach prog : benchmark_progs + # FIXME meson doesn't like binaries with the same name + # meanwhile just suffix with _bench + executable(prog + '_bench', prog + '.c', + dependencies : test_deps) +endforeachlib/meson.build new file +166
-0@@ -0,0 +1,166 @@ +lib_headers = [ + 'debug.h', + 'drmtest.h', + 'i830_reg.h', + 'i915_3d.h', + 'i915_reg.h', + 'i915_pciids.h', + 'igt.h', + 'igt_debugfs.h', + 'igt_aux.h', + 'igt_edid_template.h', + 'igt_gt.h', + 'igt_gvt.h', + 'igt_primes.h', + 'igt_rand.h', + 'igt_stats.h', + 'igt_sysfs.h', + 'igt_x86.h', + 'igt_vgem.h', + 'instdone.h', + 'intel_batchbuffer.h', + 'intel_chipset.h', + 'intel_io.h', + 'intel_reg.h', + 'ioctl_wrappers.h', + 'media_fill.h', + 'media_spin.h', + 'gpgpu_fill.h', + 'gen7_media.h', + 'gen8_media.h', + 'gen6_render.h', + 'gen7_render.h', + 'gen8_render.h', + 'gen9_render.h', + 'rendercopy.h', + 'sw_sync.h', + 'igt_kms.h', + 'igt_fb.h', + 'igt_core.h', + 'igt_draw.h', + 'igt_pm.h', + 'igt_dummyload.h', + 'uwildmat/uwildmat.h', + 'igt_kmod.h', +] + +lib_sources = [ + 'drmtest.c', + 'igt_debugfs.c', + 'igt_aux.c', + 'igt_gt.c', + 'igt_gvt.c', + 'igt_primes.c', + 'igt_rand.c', + 'igt_stats.c', + 'igt_sysfs.c', + 'igt_x86.c', + 'igt_vgem.c', + 'instdone.c', + 'intel_batchbuffer.c', + 'intel_chipset.c', + 'intel_device_info.c', + 'intel_os.c', + 'intel_mmio.c', + 'ioctl_wrappers.c', + 'media_fill_gen7.c', + 'media_fill_gen8.c', + 'media_fill_gen8lp.c', + 'media_fill_gen9.c', + 'media_spin.c', + 'gpgpu_fill.c', + 'rendercopy_i915.c', + 'rendercopy_i830.c', + 'rendercopy_gen6.c', + 'rendercopy_gen7.c', + 'rendercopy_gen8.c', + 'rendercopy_gen9.c', + 'sw_sync.c', + 'intel_reg_map.c', + 'intel_iosf.c', + 'igt_kms.c', + 'igt_fb.c', + 'igt_core.c', + 'igt_draw.c', + 'igt_pm.c', + 'igt_dummyload.c', + 'uwildmat/uwildmat.c', + 'igt_kmod.c', +] + +lib_deps = [ + cairo, + glib, + libdrm, + libkmod, + libprocps, + libudev, + libunwind, + pciaccess, + pthreads, + math, + realtime, +] + +if libdrm_intel.found() + lib_deps += libdrm_intel +else + lib_headers += 'stubs/drm/intel_bufmgr.h' + 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 + +if gsl.found() + lib_deps += gsl + lib_headers += [ 'igt_frame.h', 'igt_audio.h' ] + lib_sources += [ 'igt_frame.c', 'igt_audio.c' ] +endif + +if alsa.found() + lib_deps += alsa + lib_headers += 'igt_alsa.h' + lib_sources += 'igt_alsa.c' +endif + +if chamelium.found() + lib_deps += chamelium + lib_headers += 'igt_chamelium.h' + lib_sources += 'igt_chamelium.c' +endif + +install_headers(lib_headers) + +pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools') +srcdir = join_paths(meson.source_root(), 'tests') + +vcs_tag(input : 'version.h.in', output : 'version.h', + fallback : 'NO-GIT', + command : [ 'git', 'log', '-n1', '--pretty=format:g%h' ] ) + +# FIXME we don't regenerate when the script changes +prepend_log_domain = generator(find_program('prepend_log_domain.sh'), + arguments : [ '@INPUT@', '@OUTPUT@' ], + output : '@PLAINNAME@' + '.pre.c') + +processed_src_dep = prepend_log_domain.process(lib_sources) + +lib_igt_build = shared_library('igt', + processed_src_dep, + include_directories : inc, + dependencies : lib_deps, + c_args : [ '-DIGT_DATADIR="@0@"'.format(pkgdatadir), + '-DIGT_SRCDIR="@0@"'.format(srcdir), ]) + +lib_igt = declare_dependency(link_with : lib_igt_build, + include_directories : inc) + +igt_deps = [ lib_igt ] + lib_deps + +subdir('tests')lib/prepend_log_domain.sh new file +8
-0@@ -0,0 +1,8 @@ +#!/bin/bash + +input=$1 +output=$2 +basename=$(basename $1 .c) + +echo "#define IGT_LOG_DOMAIN \"$basename\"" > $output +cat $input >> $outputlib/tests/meson.build new file +34
-0@@ -0,0 +1,34 @@ +lib_tests = [ + 'igt_fork_helper', + 'igt_list_only', + 'igt_simulation', + 'igt_stats', + 'igt_segfault', + 'igt_subtest_group', + 'igt_assert', + 'igt_exit_handler', + 'igt_hdmi_inject', + 'igt_can_fail', + 'igt_can_fail_simple', +] + +lib_fail_tests = [ + 'igt_no_exit', + 'igt_no_exit_list_only', + 'igt_no_subtest', + 'igt_simple_test_subtests', + 'igt_timeout', + 'igt_invalid_subtest_name', +] + +foreach lib_test : lib_tests + exec = executable(lib_test, lib_test + '.c', install : true, + dependencies : igt_deps) + test('lib: ' + lib_test, exec) +endforeach + +foreach lib_test : lib_fail_tests + exec = executable(lib_test, lib_test + '.c', install : true, + dependencies : igt_deps) + test('lib: ' + lib_test, exec, should_fail : true) +endforeachlib/version.h.in new file +1
-0@@ -0,0 +1 @@ +#define IGT_GIT_SHA1 "@VCS_TAG@"meson.build new file +105
-0@@ -0,0 +1,105 @@ +project('IGT gpu tests', 'c', + version : '1.19', + default_options: [ + 'warning_level=2', + 'c_std=gnu99', + ], + license : 'MIT') + +cc = meson.get_compiler('c') + +inc = include_directories('lib', '.') + +config_h = 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) + +pciaccess = dependency('pciaccess', version : '>=0.10') +libkmod = dependency('libkmod') +libprocps = dependency('libprocps', required : false) +if libprocps.found() + config_h.set('HAVE_PROCPS', 1) +endif + +valgrind = dependency('valgrind', required : false) +if valgrind.found() + config_h.set('HAVE_VALGRIND', 1) +endif + +cairo = dependency('cairo', version : '>1.12.0', required : false) + +libudev = dependency('libudev', required : false) +if libudev.found() + config_h.set('HAVE_UDEV', 1) +endif + +glib = dependency('glib-2.0', required : false) +if glib.found() + config_h.set('HAVE_GLIB', 1) +endif + +libunwind = dependency('libunwind') +gsl = dependency('gsl', required : false) +alsa = dependency('alsa', required : false) + +pixman = dependency('pixman-1', required : false) +xmlrpc = dependency('xmlrpc', required : false) +xmlrpc_util = dependency('xmlrpc_util', required : false) +xmlrpc_client = dependency('xmlrpc_client', required : false) + +if pixman.found() and xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found() + chamelium = declare_dependency(dependencies : [ pixman, xmlrpc, + xmlrpc_util, xmlrpc_client]) +else + chamelium = dependency('', required: false) +endif + +pthreads = dependency('threads') +math = cc.find_library('m') +realtime = cc.find_library('rt') +dlsym = cc.find_library('dl') +zlib = cc.find_library('z') + +if cc.has_header('linux/kd.h') + config_h.set('HAVE_LINUX_KD_H', 1) +endif +if cc.has_header('sys/kd.h') + config_h.set('HAVE_SYS_KD_H', 1) +endif +if cc.has_header('libgen.h') + config_h.set('HAVE_LIBGEN_H', 1) +endif +if cc.has_header('sys/io.h') + config_h.set('HAVE_SYS_IO_H', 1) +endif +if cc.has_header('cpuid.h') + # FIXME: Do we need the example link test from configure.ac? + config_h.set('HAVE_CPUID_H', 1) +endif + +if cc.has_member('struct sysinfo', 'totalram', + prefix : '#include <sys/sysinfo.h>') + config_h.set('HAVE_STRUCT_SYSINFO_TOTALRAM', 1) +endif + +add_project_arguments('-D_GNU_SOURCE', language : 'c') +add_project_arguments('-include', 'config.h', language : 'c') + +config_h.set_quoted('PACKAGE_VERSION', meson.project_version()) +config_h.set_quoted('PACKAGE', meson.project_name()) +config_h.set_quoted('TARGET_CPU_PLATFORM', host_machine.cpu_family()) + +configure_file(output: 'config.h', install: false, configuration: config_h) + +subdir('lib') +subdir('tests') +subdir('benchmarks') +subdir('tools') +if libdrm_intel.found() + subdir('assembler') + subdir('overlay') +endifoverlay/meson.build new file +59
-0@@ -0,0 +1,59 @@ +gpu_overlay_src = [ + 'chart.c', + 'config.c', + 'cpu-top.c', + 'debugfs.c', + 'gem-interrupts.c', + 'gem-objects.c', + 'gpu-top.c', + 'gpu-perf.c', + 'gpu-freq.c', + 'igfx.c', + 'overlay.c', + 'perf.c', + 'power.c', + 'rc6.c', +] + +xv = dependency('xv', required : false) +x11 = dependency('x11', required : false) +xext = dependency('xext', required : false) +dri2proto = dependency('dri2proto', version : '>= 2.6', required : false) +cairo_xlib = dependency('cairo-xlib', required : false) +xrandr = dependency('xrandr', version : '>=1.3', required : false) + +gpu_overlay_deps = [ realtime, cairo, pciaccess, libdrm, libdrm_intel ] + +both_x11_src = '' + +gpu_overlay_cflags = [] +if xv.found() and x11.found() and xext.found() and dri2proto.found() + both_x11_src = 'x11/position.c' + gpu_overlay_src += [ + 'x11/dri2.c', + 'x11/dri2.h', + 'x11/rgb2yuv.c', + 'x11/rgb2yuv.h', + 'x11/x11-overlay.c', + ] + gpu_overlay_deps += [ xv, x11, xext, dri2proto ] + gpu_overlay_cflags += [ '-DHAVE_OVERLAY_XVLIB' ] +endif + +if cairo_xlib.found() and xrandr.found() and dri2proto.found() + both_x11_src = 'x11/position.c' + gpu_overlay_src += 'x11/x11-window.c' + gpu_overlay_deps += [ cairo_xlib, dri2proto ] + gpu_overlay_cflags += [ '-DHAVE_OVERLAY_XLIB' ] +endif + +gpu_overlay_src += both_x11_src + +gpu_overlay_src += 'kms/kms-overlay.c' + +if xrandr.found() and cairo.found() + executable('intel_gpu_overlay', gpu_overlay_src, + include_directories : inc, + c_args : gpu_overlay_cflags, + dependencies : gpu_overlay_deps) +endiftests/generate_testlist.sh new file +10
-0@@ -0,0 +1,10 @@ +#!/bin/bash + +echo TESTLIST > $MESON_BUILD_ROOT/tests/test-list.txt + +while [[ $# -gt 0 ]] ; do + echo $1 >> $MESON_BUILD_ROOT/tests/test-list.txt + shift +done + +echo END TESTLIST >> $MESON_BUILD_ROOT/tests/test-list.txttests/meson.build new file +290
-0@@ -0,0 +1,290 @@ +test_progs = [ + 'core_auth', + 'core_get_client_auth', + 'core_getclient', + 'core_getstats', + 'core_getversion', + 'core_prop_blob', + 'core_setmaster_vs_auth', + 'debugfs_test', + 'drm_import_export', + 'drm_mm', + 'drm_read', + 'drm_vma_limiter', + 'drm_vma_limiter_cached', + 'drm_vma_limiter_cpu', + 'drm_vma_limiter_gtt', + 'drv_getparams_basic', + 'drv_hangman', + 'drv_missed_irq', + 'drv_module_reload', + 'drv_selftest', + 'drv_suspend', + 'gem_bad_length', + 'gem_bad_reloc', + 'gem_basic', + 'gem_busy', + 'gem_caching', + 'gem_close', + 'gem_close_race', + 'gem_concurrent_blit', + 'gem_cpu_reloc', + 'gem_create', + 'gem_cs_prefetch', + 'gem_cs_tlb', + 'gem_ctx_bad_destroy', + 'gem_ctx_bad_exec', + 'gem_ctx_basic', + 'gem_ctx_create', + 'gem_ctx_exec', + 'gem_ctx_param', + 'gem_ctx_switch', + 'gem_ctx_thrash', + 'gem_double_irq_loop', + 'gem_eio', + 'gem_evict_alignment', + 'gem_evict_everything', + 'gem_exec_alignment', + 'gem_exec_async', + 'gem_exec_await', + 'gem_exec_bad_domains', + 'gem_exec_basic', + 'gem_exec_big', + 'gem_exec_blt', + 'gem_exec_capture', + 'gem_exec_create', + 'gem_exec_faulting_reloc', + 'gem_exec_fence', + 'gem_exec_flush', + 'gem_exec_gttfill', + 'gem_exec_latency', + 'gem_exec_lut_handle', + 'gem_exec_nop', + 'gem_exec_parallel', + 'gem_exec_params', + 'gem_exec_parse', + 'gem_exec_reloc', + 'gem_exec_reuse', + 'gem_exec_schedule', + 'gem_exec_store', + 'gem_exec_suspend', + 'gem_exec_whisper', + 'gem_fd_exhaustion', + 'gem_fence_thrash', + 'gem_fence_upload', + 'gem_fenced_exec_thrash', + 'gem_flink_basic', + 'gem_flink_race', + 'gem_gpgpu_fill', + 'gem_gtt_cpu_tlb', + 'gem_gtt_hog', + 'gem_gtt_speed', + 'gem_hangcheck_forcewake', + 'gem_largeobject', + 'gem_linear_blits', + 'gem_lut_handle', + 'gem_madvise', + 'gem_media_fill', + 'gem_mmap', + 'gem_mmap_gtt', + 'gem_mmap_offset_exhaustion', + 'gem_mmap_wc', + 'gem_mocs_settings', + 'gem_partial_pwrite_pread', + 'gem_persistent_relocs', + 'gem_pin', + 'gem_pipe_control_store_loop', + 'gem_ppgtt', + 'gem_pread', + 'gem_pread_after_blit', + 'gem_pwrite', + 'gem_pwrite_pread', + 'gem_pwrite_snooped', + 'gem_read_read_speed', + 'gem_readwrite', + 'gem_reg_read', + 'gem_reloc_overflow', + 'gem_reloc_vs_gpu', + 'gem_render_copy', + 'gem_render_copy_redux', + 'gem_render_linear_blits', + 'gem_render_tiled_blits', + 'gem_request_retire', + 'gem_reset_stats', + 'gem_ring_sync_copy', + 'gem_ring_sync_loop', + 'gem_ringfill', + 'gem_seqno_wrap', + 'gem_set_tiling_vs_blt', + 'gem_set_tiling_vs_gtt', + 'gem_set_tiling_vs_pwrite', + 'gem_shrink', + 'gem_softpin', + 'gem_spin_batch', + 'gem_stolen', + 'gem_storedw_batches_loop', + 'gem_storedw_loop', + 'gem_streaming_writes', + 'gem_sync', + 'gem_threaded_access_tiled', + 'gem_tiled_blits', + 'gem_tiled_fence_blits', + 'gem_tiled_partial_pwrite_pread', + 'gem_tiled_pread_basic', + 'gem_tiled_pread_pwrite', + 'gem_tiled_swapping', + 'gem_tiled_wb', + 'gem_tiled_wc', + 'gem_tiling_max_stride', + 'gem_unfence_active_buffers', + 'gem_unref_active_buffers', + 'gem_userptr_blits', + 'gem_wait', + 'gem_workarounds', + 'gem_write_read_ring_switch', + 'gen3_mixed_blits', + 'gen3_render_linear_blits', + 'gen3_render_mixed_blits', + 'gen3_render_tiledx_blits', + 'gen3_render_tiledy_blits', + 'gen7_forcewake_mt', + 'gvt_basic', + 'kms_3d', + 'kms_addfb_basic', + 'kms_atomic', + 'kms_atomic_transition', + 'kms_busy', + 'kms_ccs', + 'kms_chv_cursor_fail', + 'kms_concurrent', + 'kms_crtc_background_color', + 'kms_cursor_crc', + 'kms_cursor_legacy', + 'kms_draw_crc', + 'kms_fbc_crc', + 'kms_fbcon_fbt', + 'kms_fence_pin_leak', + 'kms_flip', + 'kms_flip_event_leak', + 'kms_flip_tiling', + 'kms_force_connector_basic', + 'kms_frontbuffer_tracking', + 'kms_hdmi_inject', + 'kms_invalid_dotclock', + 'kms_legacy_colorkey', + 'kms_mmap_write_crc', + 'kms_mmio_vs_cs_flip', + 'kms_panel_fitting', + 'kms_pipe_b_c_ivb', + 'kms_pipe_color', + 'kms_pipe_crc_basic', + 'kms_plane', + 'kms_plane_lowres', + 'kms_plane_multiple', + 'kms_plane_scaling', + 'kms_properties', + 'kms_psr_sink_crc', + 'kms_pwrite_crc', + 'kms_render', + 'kms_rmfb', + 'kms_rotation_crc', + 'kms_setmode', + 'kms_sink_crc_basic', + 'kms_sysfs_edid_timing', + 'kms_tv_load_detect', + 'kms_universal_plane', + 'kms_vblank', + 'meta_test', + 'perf', + 'pm_backlight', + 'pm_lpsp', + 'pm_rc6_residency', + 'pm_rpm', + 'pm_rps', + 'pm_sseu', + 'prime_busy', + 'prime_mmap', + 'prime_mmap_coherency', + 'prime_mmap_kms', + 'prime_self_import', + 'prime_udl', + 'prime_vgem', + 'sw_sync', + 'syncobj_basic', + 'template', + 'tools_test', + 'vgem_basic', + 'vgem_slow', +] + +test_deps = [ igt_deps ] +if libdrm_nouveau.found() + test_progs += [ + 'prime_nv_api', + 'prime_nv_pcopy', + 'prime_nv_test', + ] + 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 libdrm_amdgpu.found() + # FIXME meson/ninja really doesn't like build targets with paths in them + test_progs += [ + 'amdgpu/amd_basic', + 'amdgpu/amd_cs_nop', + 'amdgpu/amd_prime', + ] + test_deps += libdrm_amdgpu +endif + +if alsa.found() + test_progs += [ + 'audio', + ] + test_deps += alsa +endif + +foreach prog : test_progs + executable(prog, prog + '.c', + dependencies : test_deps) +endforeach + +executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'], + dependencies : test_deps) +test_progs += 'testdisplay' + +run_command('generate_testlist.sh', test_progs) + +test_script = find_program('igt_command_line.sh') +foreach prog : test_progs + test('testcase check: ' + prog, test_script, + args : prog) +endforeach + +executable('gem_stress', 'gem_stress.c', dependencies : igt_deps) + +# IMPORTANT: These tests here are all disabled because the result in sometime +# unrecoverable gpu hangs. Don't put real testcases here. +hang_progs = [ + 'gem_bad_batch', + 'gem_hang', + 'gem_bad_blit', + 'gem_bad_address', + 'gem_non_secure_batch', +] +foreach prog : hang_progs + executable(prog, prog + '.c', + dependencies : igt_deps, + install : false) +endforeachtools/meson.build new file +59
-0@@ -0,0 +1,59 @@ +tools_progs_noisnt = [ + 'hsw_compute_wrpll', + 'skl_compute_wrpll', + 'skl_ddb_allocation', +] + +foreach prog : tools_progs_noisnt + executable(prog, prog + '.c', + dependencies : igt_deps, + install : false) +endforeach + +tools_progs = [ + # FIXME we already have a libtestcase with this name as target + #'igt_stats', + 'intel_audio_dump', + 'intel_backlight', + 'intel_bios_dumper', + 'intel_display_crc', + 'intel_display_poller', + 'intel_forcewaked', + 'intel_gpu_frequency', + 'intel_firmware_decode', + 'intel_gpu_time', + 'intel_gpu_top', + 'intel_gtt', + 'intel_guc_logger', + 'intel_infoframes', + 'intel_lid', + 'intel_opregion_decode', + 'intel_panel_fitter', + 'intel_reg_checker', + 'intel_residency', + 'intel_stepping', + 'intel_vbt_decode', + 'intel_watermark', + 'intel_gem_info', + 'intel_gvtg_test', +] +tool_deps = igt_deps + +if libdrm_intel.found() + tools_progs += [ + 'intel_dump_decode', + 'intel_error_decode', + 'intel_framebuffer_dump', + 'intel_perf_counters', + ] + tool_deps += zlib +endif + +foreach prog : tools_progs + executable(prog, prog + '.c', + dependencies : tool_deps) +endforeach + +shared_library('intel_aubdump', 'aubdump.c', dependencies : [ igt_deps, dlsym ]) + +subdir('null_state_gen')tools/null_state_gen/meson.build new file +15
-0@@ -0,0 +1,15 @@ +intel_null_state_gen_src = [ + 'intel_batchbuffer.c', + 'intel_renderstate_gen6.c', + 'intel_renderstate_gen7.c', + 'intel_renderstate_gen8.c', + 'intel_renderstate_gen9.c', + 'intel_null_state_gen.c', +] + +intel_null_state_gen = executable('intel_null_state_gen', + intel_null_state_gen_src, dependencies : igt_deps, + install : false) + +# FIXME actual null_state generation. We probably want to push the the copyright +# header generation into intel_null_state_gen for simplicitySignature · 1 line
2.9.5
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 12/12] RFC: meson build system support
In reply to Daniel Vettermeson.build line 89
Quoted 6 lines · Daniel Vetter
meson.build new file +6
-0+if cc.has_member('struct sysinfo', 'totalram', + prefix : '#include <sys/sysinfo.h>') + config_h.set('HAVE_STRUCT_SYSINFO_TOTALRAM', 1) +endif + +add_project_arguments('-D_GNU_SOURCE', language : 'c')
Just something that caught my eye that bit me in the past. The project arguments are *not* passed on to feature tests such as cc.has_member(). I don't think it matters in this case, but you'll want to #define _GNU_SOURCE in the prefix if you're testing for GNU stuff. Otherwise you may end up using compat versions. Just a heads up, that's all.
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 12/12] RFC: meson build system support
Quoted 14 lines · Jani Nikula
meson.build line 89
Quoted 6 lines · Daniel Vetter
meson.build new file +6
-0+if cc.has_member('struct sysinfo', 'totalram', + prefix : '#include <sys/sysinfo.h>') + config_h.set('HAVE_STRUCT_SYSINFO_TOTALRAM', 1) +endif + +add_project_arguments('-D_GNU_SOURCE', language : 'c')Just something that caught my eye that bit me in the past. The project arguments are *not* passed on to feature tests such as
cc.has_member(). I don't think it matters in this case, but you'll want to #define_GNU_SOURCEin the prefix if you're testing for GNU stuff. Otherwise you may end up using compat versions. Just a heads up, that's all.
Ow, the fun. Well since the only has_member/function check we do have right now tests for linux vs. solaris, we should probably be safe. Or at least know really quickly when we're not safe.
For the android stuff, we'll probably just have one switch for is_android, for all the things missing in bionic. Very obviously I've done none of the "how should this work on android" thinking yet :-)
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Daniel Vetter (2017-09-02 18:03:55)
Quoted 2 lines
In meson I want to just set this everywhere (no reason not to), and doing so will allow us to clean up a few things.
GNU_SOURCE is defined in config.h, which should be included from all files (at least those that depend on system library foibles). I presume you intend to move all of config.h onto the command line? -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Chris Wilson
Quoting Daniel Vetter (2017-09-02 18:03:55)
Quoted 2 lines
In meson I want to just set this everywhere (no reason not to), and doing so will allow us to clean up a few things.
GNU_SOURCEis defined inconfig.h, which should be included from all files (at least those that depend on system library foibles). I presume you intend to move all ofconfig.honto the command line?
Wrt including config.h, we seem to be rather inconsistent with that. So what I opted for is to put stuff like that onto the cmdline, and generate a minimal config.h with just the few #defines we actually use in the meson build. That seems a robust approach, since if you use such a #define without including config.h, you'll get a complain. GNU_SOURCE otoh doesn't result in any complaints if you don't set it, but it is rather surprising to have it in some files, but not in others. Hence why I figured it's best to just add it to the gcc cmdline.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/7 lib/ioctl_wrappers: make the valgrind wrapper always emit a statement:w
In reply to Daniel Vettergcc complains otherwise about empty ; statements ...
--- lib/ioctl_wrappers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/ioctl_wrappers.c +1 -1
@@ -60,7 +60,7 @@#define VG (x) x#else -#define VG (x) +#define VG (x) do {} while (0)#endif #include "ioctl_wrappers.h"
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/7 tests/kms_plane: Appease gcc -Wempty-body
Not exactly sure what's the point, but oh well.
--- tests/kms_plane.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_plane.c +2 -1
@@ -207,8 +207,9 @@ test_plane_position_with_output(data_t *data,if (flags &TEST_POSITION_FULLY_COVERED )igt_assert_crc_equal (&test.reference_crc, &crc); -else +else { ;/* FIXME: missing reference CRCs */ + }igt_assert_crc_equal (&crc, &crc2);
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/7 meson: Add some compiler flags to reduce warnings.
In reply to Daniel VetterFrom: Eric Anholt <[email protected]>
These warnings are apparently new compared to the autotools build. We can fix the things they complain about later, if we want.
--- meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+)
meson.build +11 -0
@@ -8,6 +8,17 @@ project('IGT gpu tests', 'c', cc = meson.get_compiler('c') +add_global_arguments('-Wno-unused-parameter', language: 'c') +add_global_arguments('-Wno-sign-compare', language: 'c') +add_global_arguments('-Wno-missing-field-initializers', language: 'c') +add_global_arguments('-Wno-clobbered', language: 'c') + +# Macros asserting on the range of their arguments triggers this. +add_global_arguments('-Wno-type-limits', language: 'c') + +# igt_assert(0) in switch statements triggers a bunch of this. +add_global_arguments('-Wimplicit-fallthrough=0', language: 'c') + inc = include_directories('lib', '.') config_h = configuration_data()
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/7 meson: Don't build the igt audio test without gsl available.
In reply to Daniel VetterFrom: Eric Anholt <[email protected]>
--- tests/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/meson.build +1 -1
@@ -248,7 +248,7 @@ if libdrm_amdgpu.found() test_deps += libdrm_amdgpu endif -if alsa.found() +if alsa.found() and gsl.found() test_progs += [ 'audio', ]
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/7 meson: Use static libs to handle IGT_LOG_DOMAIN.
In reply to Daniel VetterFrom: Eric Anholt <[email protected]>
It means that compiler errors in the .c files take you to the source place in your editor, not a preprocessed temporary.
v2: Add the library deps, fails linking otherwise.
--- lib/dummy.c | 0 lib/meson.build | 36 +++++++++++++++++++++++++----------- lib/prepend_log_domain.sh | 8 -------- 3 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 lib/dummy.c delete mode 100755 lib/prepend_log_domain.sh
lib/dummy.c new file +0 -0
lib/meson.build +25 -11
@@ -144,19 +144,33 @@ vcs_tag(input : 'version.h.in', output : 'version.h', fallback : 'NO-GIT', command : [ 'git', 'log', '-n1', '--pretty=format:g%h' ] ) -# FIXME we don't regenerate when the script changes -prepend_log_domain = generator(find_program('prepend_log_domain.sh'), - arguments : [ '@INPUT@', '@OUTPUT@' ], - output : '@PLAINNAME@' + '.pre.c') - -processed_src_dep = prepend_log_domain.process(lib_sources) +lib_intermediates = [] +foreach f: lib_sources + # No / in the target name + if f.contains('uwildmat') + name = 'uwildmat' + else + name = f + endif + + lib = static_library('igt-' + name, + f, + include_directories: inc, + dependencies : lib_deps, + c_args : [ + '-DIGT_DATADIR="@0@"'.format(pkgdatadir), + '-DIGT_SRCDIR="@0@"'.format(srcdir), + '-DIGT_LOG_DOMAIN="@0@"'.format(f.split('.')[0]), + ]) + + lib_intermediates += lib +endforeach lib_igt_build = shared_library('igt', - processed_src_dep, - include_directories : inc, - dependencies : lib_deps, - c_args : [ '-DIGT_DATADIR="@0@"'.format(pkgdatadir), - '-DIGT_SRCDIR="@0@"'.format(srcdir), ]) + ['dummy.c'], + link_whole: lib_intermediates, + dependencies: lib_deps, +) lib_igt = declare_dependency(link_with : lib_igt_build, include_directories : inc)
lib/prepend_log_domain.sh deleted +0 -8
@@ -1,8 +0,0 @@ -#!/bin/bash - -input=$1 -output=$2 -basename=$(basename $1 .c) - -echo "#define IGT_LOG_DOMAIN \"$basename\"" > $output -cat $input >> $output
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/7 meson: detect cc flags
In reply to Daniel VetterSomehow my gcc has a different idea of what no-implicit-fallthrough should look like than the one Eric used.
fixup compiler flags
--- meson.build | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
meson.build +14 -8
@@ -8,16 +8,22 @@ project('IGT gpu tests', 'c', cc = meson.get_compiler('c') -add_global_arguments('-Wno-unused-parameter', language: 'c') -add_global_arguments('-Wno-sign-compare', language: 'c') -add_global_arguments('-Wno-missing-field-initializers', language: 'c') -add_global_arguments('-Wno-clobbered', language: 'c') - +cc_args = [ + '-Wno-unused-parameter', + '-Wno-sign-compare', + '-Wno-missing-field-initializers', + '-Wno-clobbered', # Macros asserting on the range of their arguments triggers this. -add_global_arguments('-Wno-type-limits', language: 'c') - + '-Wno-type-limits', # igt_assert(0) in switch statements triggers a bunch of this. -add_global_arguments('-Wimplicit-fallthrough=0', language: 'c') + '-Wimplicit-fallthrough=0', +] + +foreach cc_arg : cc_args + if cc.has_argument(cc_arg) + add_global_arguments(cc_arg, language : 'c') + endif +endforeach inc = include_directories('lib', '.')
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/7 meson: add manpage support
In reply to Daniel VetterIt seems like meson doesn't want you to string together targets like make does, but wants it all in one step. So another little shell script it is.
--- man/defs.rst.in | 5 +++++ man/meson.build | 45 +++++++++++++++++++++++++++++++++++++++++++++ man/rst2man.sh | 16 ++++++++++++++++ meson.build | 1 + 4 files changed, 67 insertions(+) create mode 100644 man/defs.rst.in create mode 100644 man/meson.build create mode 100755 man/rst2man.sh
man/defs.rst.in new file +5 -0
@@ -0,0 +1,5 @@ +.. |PACKAGE_NAME| replace:: @PACKAGE_NAME@ +.. |PACKAGE_VERSION| replace:: @PACKAGE_VERSION@ +.. |PACKAGE_STRING| replace:: @PACKAGE_STRING@ +.. |MANUAL_SECTION| replace:: 1 +.. |MANUAL_GROUP| replace:: General Commands Manual
man/meson.build new file +45 -0
45 lines not on this page · raw message
man/rst2man.sh new file +16 -0
@@ -0,0 +1,16 @@ +#!/bin/bash + +input=$1 +output=$2 + +out_dir=$(dirname ${output}) +in_file=$(basename ${input}) + +# rst2man doesn't handle multiple source directories well, and since defs.rst is +# generated we first need to move it all into the build dir +cp $input $out_dir + +rst2man $out_dir/$in_file ${output%.gz} + +rm -f ${output} +gzip ${output%.gz}
meson.build +1 -0
@@ -120,3 +120,4 @@ if libdrm_intel.found() subdir('assembler') subdir('overlay') endif +subdir('man')
Signature · 6 lines
2.9.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx