* [PATCH i-g-t 1/6] tools/meson: make per-tool dependencies instead of using global deps
2026-02-04 14:16 [PATCH i-g-t 0/6] meson/tools: split lightweight igt core and reduce tool dependencies Sebastian Brzezinka
@ 2026-02-04 14:16 ` Sebastian Brzezinka
2026-02-09 7:36 ` Krzysztof Karas
2026-02-11 15:40 ` Kamil Konieczny
2026-02-04 14:16 ` [PATCH i-g-t 2/6] tools/meson: sort tools_progs entries Sebastian Brzezinka
` (4 subsequent siblings)
5 siblings, 2 replies; 14+ messages in thread
From: Sebastian Brzezinka @ 2026-02-04 14:16 UTC (permalink / raw)
To: igt-dev; +Cc: Sebastian Brzezinka
This patch updates tools/meson.build to stop linking all tools against the full igt_deps
set plus zlib. Most tools don’t actually need cairo, glib, udev, pciaccess, or
zlib, so the blanket dependency list pulls in far more libraries than necessary.
The patch replaces the flat tool list with a dictionary that assigns only the
required extra dependencies to each tool. A small common base (lib_igt, libdrm)
remains shared. Everything else is added per‑tool.
Tools that depended on global deps implicitly now declare their actual
requirements (intel_dp_compliance, msm_dp_compliance, intel_l3_parity, intel_reg,
amd_hdmi_compliance).
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
tools/meson.build | 100 +++++++++++++++++++++++-----------------------
1 file changed, 51 insertions(+), 49 deletions(-)
diff --git a/tools/meson.build b/tools/meson.build
index 8185ba160..acd394e23 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -11,51 +11,53 @@ foreach prog : tools_progs_noisnt
install : false)
endforeach
-tools_progs = [
- 'igt_facts',
- 'igt_power',
- 'igt_stats',
- 'intel_audio_dump',
- 'intel_backlight',
- 'intel_bios_dumper',
- 'intel_display_bandwidth',
- 'intel_display_crc',
- 'intel_display_poller',
- 'intel_dump_decode',
- 'intel_error_decode',
- 'intel_forcewaked',
- 'intel_gpu_frequency',
- 'intel_firmware_decode',
- 'intel_framebuffer_dump',
- 'intel_gpu_time',
- 'intel_gtt',
- 'intel_guc_logger',
- 'intel_hdcp',
- 'intel_infoframes',
- 'intel_lid',
- 'intel_opregion_decode',
- 'intel_panel_fitter',
- 'intel_perf_counters',
- 'intel_pm_rpm',
- 'intel_reg_checker',
- 'intel_residency',
- 'intel_stepping',
- 'intel_tiling_detect',
- 'intel_vbt_decode',
- 'intel_watermark',
- 'intel_gem_info',
- 'intel_gvtg_test',
- 'dpcd_reg',
- 'lsgpu',
-]
-tool_deps = igt_deps
-tool_deps += zlib
+tools_progs = {
+ 'igt_facts': [cairo],
+ 'igt_power': [],
+ 'igt_stats': [],
+ 'intel_audio_dump': [],
+ 'intel_backlight': [],
+ 'intel_bios_dumper': [pciaccess],
+ 'intel_display_bandwidth': [],
+ 'intel_display_crc': [cairo],
+ 'intel_display_poller': [],
+ 'intel_dump_decode': [],
+ 'intel_error_decode': [zlib],
+ 'intel_forcewaked': [],
+ 'intel_gpu_frequency': [],
+ 'intel_firmware_decode': [],
+ 'intel_framebuffer_dump': [cairo],
+ 'intel_gpu_time': [],
+ 'intel_gtt': [pciaccess],
+ 'intel_guc_logger': [cairo],
+ 'intel_hdcp': [cairo],
+ 'intel_infoframes': [],
+ 'intel_lid': [],
+ 'intel_opregion_decode': [],
+ 'intel_panel_fitter': [],
+ 'intel_perf_counters': [],
+ 'intel_pm_rpm': [glib, cairo],
+ 'intel_reg_checker': [],
+ 'intel_residency': [cairo],
+ 'intel_stepping': [pciaccess],
+ 'intel_tiling_detect': [cairo],
+ 'intel_vbt_decode': [],
+ 'intel_watermark': [],
+ 'intel_gem_info': [cairo],
+ 'intel_gvtg_test': [cairo],
+ 'dpcd_reg': [],
+ 'lsgpu': [libudev, glib, cairo],
+}
-foreach prog : tools_progs
- executable(prog, prog + '.c',
- dependencies : tool_deps,
- install_rpath : bindir_rpathdir,
- install : true)
+tool_deps = [lib_igt, libdrm]
+
+foreach prog, deps : tools_progs
+ exe_deps = tool_deps + deps
+ executable( prog, prog + '.c',
+ dependencies: exe_deps,
+ install_rpath: bindir_rpathdir,
+ install: true
+ )
endforeach
if libudev.found()
@@ -65,7 +67,7 @@ if libudev.found()
'igt_compliance_utils.c'
]
executable('intel_dp_compliance', sources : intel_dp_compliance_src,
- dependencies : [tool_deps, libudev],
+ dependencies : [tool_deps, libudev, glib, cairo],
install_rpath : bindir_rpathdir,
install : true)
endif
@@ -77,13 +79,13 @@ executable('gputop', 'gputop.c',
intel_l3_parity_src = [ 'intel_l3_parity.c', 'intel_l3_udev_listener.c' ]
executable('intel_l3_parity', sources : intel_l3_parity_src,
- dependencies : tool_deps,
+ dependencies : [tool_deps, libudev],
install_rpath : bindir_rpathdir,
install : true)
intel_reg_src = [ 'intel_reg.c', 'intel_reg_decode.c', 'intel_reg_spec.c' ]
executable('intel_reg', sources : intel_reg_src,
- dependencies : tool_deps,
+ dependencies : [tool_deps, pciaccess, cairo],
install : true,
install_rpath : bindir_rpathdir,
c_args : [
@@ -100,7 +102,7 @@ executable('intel_gpu_top', 'intel_gpu_top.c',
dependencies : [lib_igt_perf,lib_igt_device_scan,lib_igt_drm_clients,lib_igt_drm_fdinfo,math])
executable('amd_hdmi_compliance', 'amd_hdmi_compliance.c',
- dependencies : [tool_deps],
+ dependencies : [tool_deps, cairo],
install_rpath : bindir_rpathdir,
install : true)
@@ -111,7 +113,7 @@ if libudev.found()
'igt_compliance_utils.c'
]
executable('msm_dp_compliance', sources : msm_dp_compliance_src,
- dependencies : [tool_deps, libudev],
+ dependencies : [tool_deps, libudev, glib, cairo],
install_rpath : bindir_rpathdir,
install : true)
endif
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH i-g-t 1/6] tools/meson: make per-tool dependencies instead of using global deps
2026-02-04 14:16 ` [PATCH i-g-t 1/6] tools/meson: make per-tool dependencies instead of using global deps Sebastian Brzezinka
@ 2026-02-09 7:36 ` Krzysztof Karas
2026-02-11 15:40 ` Kamil Konieczny
1 sibling, 0 replies; 14+ messages in thread
From: Krzysztof Karas @ 2026-02-09 7:36 UTC (permalink / raw)
To: Sebastian Brzezinka; +Cc: igt-dev
Hi Sebastian,
[...]
> -tool_deps = igt_deps
I have a suggestion for another, separate change here:
igt_deps could be defined in the root directory of
igt-gpu-tools. The name suggests that those are dependencies for
the whole build project and currently this entity sits hidden on
the same level as tools/, in lib/ directory.
This is not directly related to your series, but I do not think
it would be justifiable as a separate, very trivial patch.
[...]
> +
> +foreach prog, deps : tools_progs
> + exe_deps = tool_deps + deps
> + executable( prog, prog + '.c',
> + dependencies: exe_deps,
> + install_rpath: bindir_rpathdir,
> + install: true
> + )
No need for a newline here.
Rest of the changes in this patch look good to me.
--
Best Regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH i-g-t 1/6] tools/meson: make per-tool dependencies instead of using global deps
2026-02-04 14:16 ` [PATCH i-g-t 1/6] tools/meson: make per-tool dependencies instead of using global deps Sebastian Brzezinka
2026-02-09 7:36 ` Krzysztof Karas
@ 2026-02-11 15:40 ` Kamil Konieczny
1 sibling, 0 replies; 14+ messages in thread
From: Kamil Konieczny @ 2026-02-11 15:40 UTC (permalink / raw)
To: Sebastian Brzezinka; +Cc: igt-dev
Hi Sebastian,
On 2026-02-04 at 15:16:03 +0100, Sebastian Brzezinka wrote:
> This patch updates tools/meson.build to stop linking all tools against the full igt_deps
> set plus zlib. Most tools don’t actually need cairo, glib, udev, pciaccess, or
> zlib, so the blanket dependency list pulls in far more libraries than necessary.
>
> The patch replaces the flat tool list with a dictionary that assigns only the
> required extra dependencies to each tool. A small common base (lib_igt, libdrm)
> remains shared. Everything else is added per‑tool.
>
> Tools that depended on global deps implicitly now declare their actual
> requirements (intel_dp_compliance, msm_dp_compliance, intel_l3_parity, intel_reg,
> amd_hdmi_compliance).
>
Please add here Closes: tag for this:
Closes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/16
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
btw please look into those issue/16 link, there is a script
which should help you identify what linking libs you are missing,
see below.
> ---
> tools/meson.build | 100 +++++++++++++++++++++++-----------------------
> 1 file changed, 51 insertions(+), 49 deletions(-)
>
> diff --git a/tools/meson.build b/tools/meson.build
> index 8185ba160..acd394e23 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -11,51 +11,53 @@ foreach prog : tools_progs_noisnt
> install : false)
> endforeach
>
> -tools_progs = [
> - 'igt_facts',
[cut]
> -]
> -tool_deps = igt_deps
> -tool_deps += zlib
> +tools_progs = {
> + 'igt_facts': [cairo],
> + 'igt_power': [],
> + 'igt_stats': [],
> + 'intel_audio_dump': [],
> + 'intel_backlight': [],
> + 'intel_bios_dumper': [pciaccess],
> + 'intel_display_bandwidth': [],
> + 'intel_display_crc': [cairo],
> + 'intel_display_poller': [],
> + 'intel_dump_decode': [],
> + 'intel_error_decode': [zlib],
> + 'intel_forcewaked': [],
> + 'intel_gpu_frequency': [],
> + 'intel_firmware_decode': [],
> + 'intel_framebuffer_dump': [cairo],
> + 'intel_gpu_time': [],
> + 'intel_gtt': [pciaccess],
> + 'intel_guc_logger': [cairo],
> + 'intel_hdcp': [cairo],
This still do not build:
[1285/2063] Linking target tools/intel_hdcp
FAILED: tools/intel_hdcp
cc -o tools/intel_hdcp tools/intel_hdcp.p/intel_hdcp.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group lib/libigt.so.0 /usr/lib/x86_64-linux-gnu/libdrm.so /usr/lib/x86_64-linux-gnu/libcairo.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/../lib' -Wl,-rpath-link,/opt/builds/build/lib
/usr/bin/ld: tools/intel_hdcp.p/intel_hdcp.c.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Regards,
Kamil
> + 'intel_infoframes': [],
> + 'intel_lid': [],
> + 'intel_opregion_decode': [],
> + 'intel_panel_fitter': [],
> + 'intel_perf_counters': [],
> + 'intel_pm_rpm': [glib, cairo],
> + 'intel_reg_checker': [],
> + 'intel_residency': [cairo],
> + 'intel_stepping': [pciaccess],
> + 'intel_tiling_detect': [cairo],
> + 'intel_vbt_decode': [],
> + 'intel_watermark': [],
> + 'intel_gem_info': [cairo],
> + 'intel_gvtg_test': [cairo],
> + 'dpcd_reg': [],
> + 'lsgpu': [libudev, glib, cairo],
> +}
>
[cut]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH i-g-t 2/6] tools/meson: sort tools_progs entries
2026-02-04 14:16 [PATCH i-g-t 0/6] meson/tools: split lightweight igt core and reduce tool dependencies Sebastian Brzezinka
2026-02-04 14:16 ` [PATCH i-g-t 1/6] tools/meson: make per-tool dependencies instead of using global deps Sebastian Brzezinka
@ 2026-02-04 14:16 ` Sebastian Brzezinka
2026-02-09 7:54 ` Krzysztof Karas
2026-02-04 14:16 ` [PATCH i-g-t 3/6] tools/meson: normalize tool dependencies and executable definitions Sebastian Brzezinka
` (3 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Sebastian Brzezinka @ 2026-02-04 14:16 UTC (permalink / raw)
To: igt-dev; +Cc: Sebastian Brzezinka
Reorder tools_progs entries in tools/meson.build to keep the list
organized and avoid duplicate or misplaced tool definitions.
No functional or dependency changes.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
tools/meson.build | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/meson.build b/tools/meson.build
index acd394e23..039103ce0 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -12,6 +12,7 @@ foreach prog : tools_progs_noisnt
endforeach
tools_progs = {
+ 'dpcd_reg': [],
'igt_facts': [cairo],
'igt_power': [],
'igt_stats': [],
@@ -23,13 +24,15 @@ tools_progs = {
'intel_display_poller': [],
'intel_dump_decode': [],
'intel_error_decode': [zlib],
- 'intel_forcewaked': [],
- 'intel_gpu_frequency': [],
'intel_firmware_decode': [],
+ 'intel_forcewaked': [],
'intel_framebuffer_dump': [cairo],
+ 'intel_gem_info': [cairo],
+ 'intel_gpu_frequency': [],
'intel_gpu_time': [],
'intel_gtt': [pciaccess],
'intel_guc_logger': [cairo],
+ 'intel_gvtg_test': [cairo],
'intel_hdcp': [cairo],
'intel_infoframes': [],
'intel_lid': [],
@@ -43,9 +46,6 @@ tools_progs = {
'intel_tiling_detect': [cairo],
'intel_vbt_decode': [],
'intel_watermark': [],
- 'intel_gem_info': [cairo],
- 'intel_gvtg_test': [cairo],
- 'dpcd_reg': [],
'lsgpu': [libudev, glib, cairo],
}
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH i-g-t 2/6] tools/meson: sort tools_progs entries
2026-02-04 14:16 ` [PATCH i-g-t 2/6] tools/meson: sort tools_progs entries Sebastian Brzezinka
@ 2026-02-09 7:54 ` Krzysztof Karas
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Karas @ 2026-02-09 7:54 UTC (permalink / raw)
To: Sebastian Brzezinka; +Cc: igt-dev
Hi Sebastian,
On 2026-02-04 at 15:16:04 +0100, Sebastian Brzezinka wrote:
> Reorder tools_progs entries in tools/meson.build to keep the list
> organized and avoid duplicate or misplaced tool definitions.
>
> No functional or dependency changes.
>
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> ---
> tools/meson.build | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/meson.build b/tools/meson.build
> index acd394e23..039103ce0 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -12,6 +12,7 @@ foreach prog : tools_progs_noisnt
> endforeach
>
It might be good to add a comment here:
# Keep in alphabetical order
though, I will not block this change with that suggestion:
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
> tools_progs = {
> + 'dpcd_reg': [],
> 'igt_facts': [cairo],
> 'igt_power': [],
> 'igt_stats': [],
> @@ -23,13 +24,15 @@ tools_progs = {
> 'intel_display_poller': [],
> 'intel_dump_decode': [],
> 'intel_error_decode': [zlib],
> - 'intel_forcewaked': [],
> - 'intel_gpu_frequency': [],
> 'intel_firmware_decode': [],
> + 'intel_forcewaked': [],
> 'intel_framebuffer_dump': [cairo],
> + 'intel_gem_info': [cairo],
> + 'intel_gpu_frequency': [],
> 'intel_gpu_time': [],
> 'intel_gtt': [pciaccess],
> 'intel_guc_logger': [cairo],
> + 'intel_gvtg_test': [cairo],
> 'intel_hdcp': [cairo],
> 'intel_infoframes': [],
> 'intel_lid': [],
> @@ -43,9 +46,6 @@ tools_progs = {
> 'intel_tiling_detect': [cairo],
> 'intel_vbt_decode': [],
> 'intel_watermark': [],
> - 'intel_gem_info': [cairo],
> - 'intel_gvtg_test': [cairo],
> - 'dpcd_reg': [],
> 'lsgpu': [libudev, glib, cairo],
> }
>
> --
> 2.52.0
>
--
Best Regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH i-g-t 3/6] tools/meson: normalize tool dependencies and executable definitions
2026-02-04 14:16 [PATCH i-g-t 0/6] meson/tools: split lightweight igt core and reduce tool dependencies Sebastian Brzezinka
2026-02-04 14:16 ` [PATCH i-g-t 1/6] tools/meson: make per-tool dependencies instead of using global deps Sebastian Brzezinka
2026-02-04 14:16 ` [PATCH i-g-t 2/6] tools/meson: sort tools_progs entries Sebastian Brzezinka
@ 2026-02-04 14:16 ` Sebastian Brzezinka
2026-02-09 8:38 ` Krzysztof Karas
2026-02-04 14:16 ` [PATCH i-g-t 4/6] tools/lsgpu: drop cairo and switch to igt_core Sebastian Brzezinka
` (2 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Sebastian Brzezinka @ 2026-02-04 14:16 UTC (permalink / raw)
To: igt-dev; +Cc: Sebastian Brzezinka
Refactor tools/meson.build to consistently use a common tool_deps
(lib_igt, libdrm) base and layer per-tool dependencies explicitly.
Fold previously standalone tool definitions (e.g. gputop,
intel_gpu_top, amd_hdmi_compliance) into tools_progs and unify
executable() creation.
This is a build-system cleanup only; no functional changes.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
tools/meson.build | 134 +++++++++++++++++++++-------------------------
1 file changed, 62 insertions(+), 72 deletions(-)
diff --git a/tools/meson.build b/tools/meson.build
index 039103ce0..f7874cf82 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -11,50 +11,58 @@ foreach prog : tools_progs_noisnt
install : false)
endforeach
+tool_deps = [lib_igt, libdrm]
tools_progs = {
- 'dpcd_reg': [],
- 'igt_facts': [cairo],
- 'igt_power': [],
- 'igt_stats': [],
- 'intel_audio_dump': [],
- 'intel_backlight': [],
- 'intel_bios_dumper': [pciaccess],
- 'intel_display_bandwidth': [],
- 'intel_display_crc': [cairo],
- 'intel_display_poller': [],
- 'intel_dump_decode': [],
- 'intel_error_decode': [zlib],
- 'intel_firmware_decode': [],
- 'intel_forcewaked': [],
- 'intel_framebuffer_dump': [cairo],
- 'intel_gem_info': [cairo],
- 'intel_gpu_frequency': [],
- 'intel_gpu_time': [],
- 'intel_gtt': [pciaccess],
- 'intel_guc_logger': [cairo],
- 'intel_gvtg_test': [cairo],
- 'intel_hdcp': [cairo],
- 'intel_infoframes': [],
- 'intel_lid': [],
- 'intel_opregion_decode': [],
- 'intel_panel_fitter': [],
- 'intel_perf_counters': [],
- 'intel_pm_rpm': [glib, cairo],
- 'intel_reg_checker': [],
- 'intel_residency': [cairo],
- 'intel_stepping': [pciaccess],
- 'intel_tiling_detect': [cairo],
- 'intel_vbt_decode': [],
- 'intel_watermark': [],
- 'lsgpu': [libudev, glib, cairo],
+ 'amd_hdmi_compliance': [tool_deps, cairo],
+ 'dpcd_reg': [tool_deps],
+ 'gputop': [lib_igt_drm_clients,
+ lib_igt_drm_fdinfo,
+ lib_igt_profiling,
+ math],
+ 'igt_facts': [tool_deps, cairo],
+ 'igt_power': [tool_deps],
+ 'igt_stats': [tool_deps],
+ 'intel_audio_dump': [tool_deps],
+ 'intel_backlight': [tool_deps],
+ 'intel_bios_dumper': [tool_deps, pciaccess],
+ 'intel_display_bandwidth': [tool_deps],
+ 'intel_display_crc': [tool_deps, cairo],
+ 'intel_display_poller': [tool_deps],
+ 'intel_dump_decode': [tool_deps],
+ 'intel_error_decode': [tool_deps, zlib],
+ 'intel_firmware_decode': [tool_deps],
+ 'intel_forcewaked': [tool_deps],
+ 'intel_framebuffer_dump': [tool_deps, cairo],
+ 'intel_gem_info': [tool_deps, cairo],
+ 'intel_gpu_frequency': [tool_deps],
+ 'intel_gpu_time': [tool_deps],
+ 'intel_gpu_top': [lib_igt_perf,
+ lib_igt_device_scan,
+ lib_igt_drm_clients,
+ lib_igt_drm_fdinfo,
+ math],
+ 'intel_gtt': [tool_deps, pciaccess],
+ 'intel_guc_logger': [tool_deps, cairo, pthreads],
+ 'intel_gvtg_test': [tool_deps, cairo],
+ 'intel_hdcp': [tool_deps, cairo],
+ 'intel_infoframes': [tool_deps],
+ 'intel_lid': [tool_deps],
+ 'intel_opregion_decode': [tool_deps],
+ 'intel_panel_fitter': [tool_deps],
+ 'intel_perf_counters': [tool_deps],
+ 'intel_pm_rpm': [tool_deps, glib, cairo],
+ 'intel_reg_checker': [tool_deps],
+ 'intel_residency': [tool_deps, cairo],
+ 'intel_stepping': [tool_deps, pciaccess],
+ 'intel_tiling_detect': [tool_deps, cairo],
+ 'intel_vbt_decode': [tool_deps],
+ 'intel_watermark': [tool_deps],
+ 'lsgpu': [tool_deps, libudev, glib, cairo],
}
-tool_deps = [lib_igt, libdrm]
-
foreach prog, deps : tools_progs
- exe_deps = tool_deps + deps
executable( prog, prog + '.c',
- dependencies: exe_deps,
+ dependencies: deps,
install_rpath: bindir_rpathdir,
install: true
)
@@ -70,18 +78,23 @@ if libudev.found()
dependencies : [tool_deps, libudev, glib, cairo],
install_rpath : bindir_rpathdir,
install : true)
-endif
-executable('gputop', 'gputop.c',
- install : true,
- install_rpath : bindir_rpathdir,
- dependencies : [lib_igt_drm_clients,lib_igt_drm_fdinfo,lib_igt_profiling,math])
+ msm_dp_compliance_src = [
+ 'msm_dp_compliance.c',
+ 'igt_dp_compliance_hotplug.c',
+ 'igt_compliance_utils.c'
+ ]
+ executable('msm_dp_compliance', sources : msm_dp_compliance_src,
+ dependencies : [tool_deps, libudev, glib, cairo],
+ install_rpath : bindir_rpathdir,
+ install : true)
-intel_l3_parity_src = [ 'intel_l3_parity.c', 'intel_l3_udev_listener.c' ]
-executable('intel_l3_parity', sources : intel_l3_parity_src,
- dependencies : [tool_deps, libudev],
- install_rpath : bindir_rpathdir,
- install : true)
+ intel_l3_parity_src = ['intel_l3_parity.c', 'intel_l3_udev_listener.c']
+ executable('intel_l3_parity', sources : intel_l3_parity_src,
+ dependencies : [tool_deps, libudev],
+ install_rpath : bindir_rpathdir,
+ install : true)
+endif
intel_reg_src = [ 'intel_reg.c', 'intel_reg_decode.c', 'intel_reg_spec.c' ]
executable('intel_reg', sources : intel_reg_src,
@@ -93,31 +106,8 @@ executable('intel_reg', sources : intel_reg_src,
])
install_data(['intel_gpu_abrt', 'intel-gfx-fw-info'], install_dir : bindir)
-
install_subdir('registers', install_dir : datadir)
-executable('intel_gpu_top', 'intel_gpu_top.c',
- install : true,
- install_rpath : bindir_rpathdir,
- dependencies : [lib_igt_perf,lib_igt_device_scan,lib_igt_drm_clients,lib_igt_drm_fdinfo,math])
-
-executable('amd_hdmi_compliance', 'amd_hdmi_compliance.c',
- dependencies : [tool_deps, cairo],
- install_rpath : bindir_rpathdir,
- install : true)
-
-if libudev.found()
- msm_dp_compliance_src = [
- 'msm_dp_compliance.c',
- 'igt_dp_compliance_hotplug.c',
- 'igt_compliance_utils.c'
- ]
- executable('msm_dp_compliance', sources : msm_dp_compliance_src,
- dependencies : [tool_deps, libudev, glib, cairo],
- install_rpath : bindir_rpathdir,
- install : true)
-endif
-
if build_vmtb
install_subdir('vmtb', install_dir: libexecdir)
endif
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH i-g-t 3/6] tools/meson: normalize tool dependencies and executable definitions
2026-02-04 14:16 ` [PATCH i-g-t 3/6] tools/meson: normalize tool dependencies and executable definitions Sebastian Brzezinka
@ 2026-02-09 8:38 ` Krzysztof Karas
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Karas @ 2026-02-09 8:38 UTC (permalink / raw)
To: Sebastian Brzezinka; +Cc: igt-dev
Hi Sebastian,
> Refactor tools/meson.build to consistently use a common tool_deps
> (lib_igt, libdrm) base and layer per-tool dependencies explicitly.
>
> Fold previously standalone tool definitions (e.g. gputop,
> intel_gpu_top, amd_hdmi_compliance) into tools_progs and unify
> executable() creation.
>
> This is a build-system cleanup only; no functional changes.
>
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> ---
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
--
Best Regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH i-g-t 4/6] tools/lsgpu: drop cairo and switch to igt_core
2026-02-04 14:16 [PATCH i-g-t 0/6] meson/tools: split lightweight igt core and reduce tool dependencies Sebastian Brzezinka
` (2 preceding siblings ...)
2026-02-04 14:16 ` [PATCH i-g-t 3/6] tools/meson: normalize tool dependencies and executable definitions Sebastian Brzezinka
@ 2026-02-04 14:16 ` Sebastian Brzezinka
2026-02-09 8:45 ` Krzysztof Karas
2026-02-04 14:16 ` [PATCH i-g-t 5/6] lib/igt_tools_stub: Add igt_load_igtrc() stub implementation Sebastian Brzezinka
2026-02-04 14:16 ` [PATCH i-g-t 6/6] lib/meson: build core sources as per-file static libs with minimal deps Sebastian Brzezinka
5 siblings, 1 reply; 14+ messages in thread
From: Sebastian Brzezinka @ 2026-02-04 14:16 UTC (permalink / raw)
To: igt-dev; +Cc: Sebastian Brzezinka
Replace the full igt.h include with igt_core.h and link lsgpu against
lib_core_igt.
This removes the cairo dependency and limits lsgpu to the minimal core
IGT functionality required for device enumeration.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
tools/lsgpu.c | 3 +--
tools/meson.build | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/lsgpu.c b/tools/lsgpu.c
index 935371dea..057a594ea 100644
--- a/tools/lsgpu.c
+++ b/tools/lsgpu.c
@@ -33,8 +33,7 @@
#include <string.h>
#include <signal.h>
#include <sys/ioctl.h>
-
-#include "igt.h"
+#include "igt_core.h"
#include "igt_device_scan.h"
/**
diff --git a/tools/meson.build b/tools/meson.build
index f7874cf82..dc56f68a4 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -57,7 +57,7 @@ tools_progs = {
'intel_tiling_detect': [tool_deps, cairo],
'intel_vbt_decode': [tool_deps],
'intel_watermark': [tool_deps],
- 'lsgpu': [tool_deps, libudev, glib, cairo],
+ 'lsgpu': [lib_core_igt, libudev, glib],
}
foreach prog, deps : tools_progs
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH i-g-t 4/6] tools/lsgpu: drop cairo and switch to igt_core
2026-02-04 14:16 ` [PATCH i-g-t 4/6] tools/lsgpu: drop cairo and switch to igt_core Sebastian Brzezinka
@ 2026-02-09 8:45 ` Krzysztof Karas
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Karas @ 2026-02-09 8:45 UTC (permalink / raw)
To: Sebastian Brzezinka; +Cc: igt-dev
Hi Sebastian,
On 2026-02-04 at 15:16:06 +0100, Sebastian Brzezinka wrote:
> Replace the full igt.h include with igt_core.h and link lsgpu against
> lib_core_igt.
>
> This removes the cairo dependency and limits lsgpu to the minimal core
> IGT functionality required for device enumeration.
>
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> ---
> tools/lsgpu.c | 3 +--
> tools/meson.build | 2 +-
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tools/lsgpu.c b/tools/lsgpu.c
> index 935371dea..057a594ea 100644
> --- a/tools/lsgpu.c
> +++ b/tools/lsgpu.c
> @@ -33,8 +33,7 @@
> #include <string.h>
> #include <signal.h>
> #include <sys/ioctl.h>
> -
> -#include "igt.h"
> +#include "igt_core.h"
> #include "igt_device_scan.h"
>
> /**
> diff --git a/tools/meson.build b/tools/meson.build
> index f7874cf82..dc56f68a4 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -57,7 +57,7 @@ tools_progs = {
> 'intel_tiling_detect': [tool_deps, cairo],
> 'intel_vbt_decode': [tool_deps],
> 'intel_watermark': [tool_deps],
> - 'lsgpu': [tool_deps, libudev, glib, cairo],
> + 'lsgpu': [lib_core_igt, libudev, glib],
> }
>
> foreach prog, deps : tools_progs
> --
> 2.52.0
>
This patch should be the last one in the current series, as
"lib_core_igt" is undefined until:
lib/meson: build core sources as per-file static libs with minimal deps.
--
Best Regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH i-g-t 5/6] lib/igt_tools_stub: Add igt_load_igtrc() stub implementation
2026-02-04 14:16 [PATCH i-g-t 0/6] meson/tools: split lightweight igt core and reduce tool dependencies Sebastian Brzezinka
` (3 preceding siblings ...)
2026-02-04 14:16 ` [PATCH i-g-t 4/6] tools/lsgpu: drop cairo and switch to igt_core Sebastian Brzezinka
@ 2026-02-04 14:16 ` Sebastian Brzezinka
2026-02-09 10:11 ` Krzysztof Karas
2026-02-04 14:16 ` [PATCH i-g-t 6/6] lib/meson: build core sources as per-file static libs with minimal deps Sebastian Brzezinka
5 siblings, 1 reply; 14+ messages in thread
From: Sebastian Brzezinka @ 2026-02-04 14:16 UTC (permalink / raw)
To: igt-dev; +Cc: Sebastian Brzezinka
Add a minimal stub implementation of igt_load_igtrc() to allow lightweight
tools like lsgpu to load IGT configuration files without requiring the full
igt_core.c and its heavy dependencies (Cairo, Pixman, X11, etc.).
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
lib/igt_tools_stub.c | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/lib/igt_tools_stub.c b/lib/igt_tools_stub.c
index 9a0ec6217..ccc393913 100644
--- a/lib/igt_tools_stub.c
+++ b/lib/igt_tools_stub.c
@@ -22,6 +22,11 @@
*
*/
#include "igt_core.h"
+#include <glib.h>
+#include <pwd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
/* Stub for igt_log, this stub will simply print the msg on stderr device.
* Domain and log level are ignored.
@@ -49,3 +54,41 @@ void __igt_fail_assert(const char *domain, const char *file,
func, assertion);
exit(1);
}
+
+/* Stub for igt_load_igtrc - loads ~/.igtrc config file */
+GKeyFile *igt_load_igtrc(void)
+{
+ char *key_file_loc;
+ GKeyFile *file;
+ GError *error = NULL;
+ int ret;
+
+ /* Determine igt config path */
+ key_file_loc = getenv("IGT_CONFIG_PATH");
+ if (!key_file_loc) {
+ struct passwd *pw = getpwuid(geteuid());
+ if (pw && pw->pw_dir)
+ ret = asprintf(&key_file_loc, "%s/.igtrc", pw->pw_dir);
+ else
+ return NULL;
+
+ if (ret == -1)
+ return NULL;
+ } else {
+ key_file_loc = strdup(key_file_loc);
+ }
+
+ file = g_key_file_new();
+
+ ret = g_key_file_load_from_file(file, key_file_loc, G_KEY_FILE_NONE, &error);
+ if (!ret) {
+ g_key_file_free(file);
+ g_error_free(error);
+ free(key_file_loc);
+ return NULL;
+ }
+
+ free(key_file_loc);
+
+ return file;
+}
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH i-g-t 5/6] lib/igt_tools_stub: Add igt_load_igtrc() stub implementation
2026-02-04 14:16 ` [PATCH i-g-t 5/6] lib/igt_tools_stub: Add igt_load_igtrc() stub implementation Sebastian Brzezinka
@ 2026-02-09 10:11 ` Krzysztof Karas
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Karas @ 2026-02-09 10:11 UTC (permalink / raw)
To: Sebastian Brzezinka; +Cc: igt-dev
Hi Sebastian,
> Add a minimal stub implementation of igt_load_igtrc() to allow lightweight
> tools like lsgpu to load IGT configuration files without requiring the full
Does lsgpu also depend on igt_tools_stub? I only found indirect
reference for intel_gpu_top:
intel_tools_stub.c -> lib_igt_device_scan_build
-> lib_igt_device_scan -> intel_gpu_top (executable).
I think that this change is a solid idea, even if only a single
app would benefit from decreasing dependency bloat.
> igt_core.c and its heavy dependencies (Cairo, Pixman, X11, etc.).
>
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> ---
[...]
--
Best Regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH i-g-t 6/6] lib/meson: build core sources as per-file static libs with minimal deps
2026-02-04 14:16 [PATCH i-g-t 0/6] meson/tools: split lightweight igt core and reduce tool dependencies Sebastian Brzezinka
` (4 preceding siblings ...)
2026-02-04 14:16 ` [PATCH i-g-t 5/6] lib/igt_tools_stub: Add igt_load_igtrc() stub implementation Sebastian Brzezinka
@ 2026-02-04 14:16 ` Sebastian Brzezinka
2026-02-09 10:41 ` Krzysztof Karas
5 siblings, 1 reply; 14+ messages in thread
From: Sebastian Brzezinka @ 2026-02-04 14:16 UTC (permalink / raw)
To: igt-dev; +Cc: Sebastian Brzezinka
Introduce a new lib_core_sources list to isolate low-level/common code
(basic data structures, device scanning/info, and basic utilities) and
build each file as a small static library.
These per-file static libs are linked via a new declare_dependency()
(lib_core_igt) and use a minimal dependency set (glib, libudev,
pciaccess).
This improves modularity and keeps core components lightweight.
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
lib/meson.build | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/lib/meson.build b/lib/meson.build
index 1a569ba52..2b94c0d1a 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -148,6 +148,27 @@ lib_deps = [
zlib
]
+lib_core_sources = [
+ # Basic data structures (no dependencies)
+ 'igt_list.c',
+ 'igt_map.c',
+
+ # Device scanning and info (minimal deps: udev, pci)
+ 'igt_device_scan.c',
+ 'intel_chipset.c',
+ 'intel_device_info.c',
+ 'intel_cmds_info.c',
+
+ # Basic utilities
+ 'igt_tools_stub.c',
+]
+
+lib_core_deps = [
+ glib,
+ libudev,
+ pciaccess,
+]
+
if libdrm_nouveau.found()
lib_deps += libdrm_nouveau
lib_sources += [
@@ -282,6 +303,27 @@ foreach f: iga64_assembly_sources
)
endforeach
+
+lib_core = []
+foreach f: lib_core_sources
+ name = f.underscorify()
+ lib = static_library('igt-core' + name,
+ [ f, lib_version ],
+ include_directories: inc,
+ dependencies : lib_core_deps,
+ c_args : [
+ '-DIGT_DATADIR="@0@"'.format(join_paths(prefix, datadir)),
+ '-DIGT_SRCDIR="@0@"'.format(srcdir),
+ '-DIGT_LOG_DOMAIN="@0@"'.format(f.split('.')[0]),
+ '-DIGT_IMGDIR="@0@"'.format(imgdir),
+ ])
+ lib_core += lib
+endforeach
+
+lib_core_igt = declare_dependency(link_with : lib_core,
+ include_directories : inc,
+ dependencies : lib_core_deps)
+
lib_intermediates = []
foreach f: lib_sources
name = f.underscorify()
--
2.52.0
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH i-g-t 6/6] lib/meson: build core sources as per-file static libs with minimal deps
2026-02-04 14:16 ` [PATCH i-g-t 6/6] lib/meson: build core sources as per-file static libs with minimal deps Sebastian Brzezinka
@ 2026-02-09 10:41 ` Krzysztof Karas
0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Karas @ 2026-02-09 10:41 UTC (permalink / raw)
To: Sebastian Brzezinka; +Cc: igt-dev
Hi Sebastian,
On 2026-02-04 at 15:16:08 +0100, Sebastian Brzezinka wrote:
> Introduce a new lib_core_sources list to isolate low-level/common code
> (basic data structures, device scanning/info, and basic utilities) and
> build each file as a small static library.
>
> These per-file static libs are linked via a new declare_dependency()
> (lib_core_igt) and use a minimal dependency set (glib, libudev,
> pciaccess).
>
> This improves modularity and keeps core components lightweight.
>
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> ---
I checked that this builds just fine on my end and I do not have
anything against the code, so:
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
--
Best Regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread