From 865a47ca2b93b208ba016f3c4fc00831ec7bfec6 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 18 Dec 2017 23:00:54 +0000 Subject: overlay: parse tracepoints from sysfs to figure out fields' location With changes going to drm-tip, the tracepoints field locations are going to change. This change introduces a tracepoint parser (using a peg parser) which lets us figure out field positions on the fly. v2: Fix automake build (Lionel) v3: Make overlay build conditional on peg (Petri) Make wait_end callback more readable (Chris) Drop tracepoint_id(), instead parsing from format file (Lionel) v4: Fix existing configure.ac issue with overlay build (Petri) v5: Silence unused function (Lionel) v6: Fix missing double quote in v4 (Lionel) Signed-off-by: Lionel Landwerlin Acked-by: Chris Wilson For the build system changes: Acked-by: Petri Latvala --- overlay/meson.build | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'overlay/meson.build') diff --git a/overlay/meson.build b/overlay/meson.build index afacff5e..8b5c52b4 100644 --- a/overlay/meson.build +++ b/overlay/meson.build @@ -51,7 +51,18 @@ gpu_overlay_src += both_x11_src gpu_overlay_src += 'kms/kms-overlay.c' -if xrandr.found() and cairo.found() +leg = find_program('leg', required : false) +if leg.found() + leg_file = custom_target('tracepoint_format', + output: 'tracepoint_format.h', + input: 'tracepoint_format.leg', + command: [leg, '-P', '-o', '@OUTPUT@', '@INPUT@']) + gpu_overlay_src += leg_file +else + warning('leg command not found, disabling overlay; try : apt-get install peg') +endif + +if leg.found() and xrandr.found() and cairo.found() executable('intel-gpu-overlay', gpu_overlay_src, include_directories : inc, c_args : gpu_overlay_cflags, -- cgit v1.2.3