From: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
To: <igt-dev@lists.freedesktop.org>
Cc: Sebastian Brzezinka <sebastian.brzezinka@intel.com>,
<kamil.konieczny@linux.intel.com>, <krzysztof.karas@intel.com>,
<krzysztof.niemiec@intel.com>
Subject: [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library
Date: Fri, 3 Jul 2026 16:28:34 +0200 [thread overview]
Message-ID: <cover.1783088106.git.sebastian.brzezinka@intel.com> (raw)
This issue was raised by the community back in 2019:
https://bugs.freedesktop.org/show_bug.cgi?id=110249
Standalone tools linked libigt.so as a side effect, pulling in cairo,
pixman and libX11 even without framebuffer use.
Following intel_gpu_top's approach, each tool now links only the static
sub-libraries it needs. Five new ones are introduced:
lib_igt_tools_stub, lib_igt_drm_stub, lib_igt_halffloat,
lib_i915_decode, lib_igt_reg_tools.
igt_load_igtrc() is moved to igt_device_scan.c so lsgpu can use
lib_igt_device_scan without pulling in libigt.so.
All 20 tools: 35 shared libs -> 3-8.
Behavioural differences vs original binaries (no-hardware runs):
intel_backlight, intel_lid, intel_gpu_time, intel_audio_dump,
intel_infoframes, intel_panel_fitter, intel_firmware_decode:
assertion failure format: IGT CRITICAL block -> single-line message;
exit code: 98 (IGT_EXIT_FAILURE) -> 1.
intel_gtt, intel_display_poller, intel_watermark:
same as above; additionally print an extra "Test requirement passed:
pci_dev" line on stderr (previously suppressed by IGT log layer).
intel_guc_logger:
same exit code change (98->1); --help drops IGT framework options
(--list-subtests, --run-subtest, --device, etc.) which had no effect
on guc_logger since it opens debugfs directly, not via IGT device
selection; --version, --debug, --hook also removed.
Unknown option exit code: 79 (IGT_EXIT_INVALID) -> 1.
intel_gvtg_test:
skip message: IGT skip block -> single-line; exit code unchanged (77).
Tested on Intel Meteor Lake-P (device 0x7d45) with the series applied:
lsgpu enumerates card0/renderD128
intel_gpu_frequency reads cur/min/max/RP1 frequencies
intel_stepping reports device 0x7d45 rev 0x04
intel_error_decode parses empty error state
igt_stats computes median from stdin
intel_backlight reads current backlight value: 0%
intel_gtt dumps GTT linear mappings
intel_gpu_time user: 0.000322s, GPU: 0.0%
intel_infoframes runs, reports hardware not yet supported
intel_panel_fitter shows usage with -l/-p/-x/-y options
intel_audio_dump dumps meteorlake audio registers
intel_watermark dumps WM_LINETIME and plane watermarks
intel_display_poller shows usage (requires --test option)
intel_lid polls lid state: open (loops by design)
intel_forcewaked locks forcewake, restarts daemon on gpu reset
intel_gvtg_test exits 77, no GVT-g hardware
intel_guc_logger --help prints usage correctly
intel_vbt_decode --help prints usage correctly
intel_firmware_decode runs, fails on missing CSR file as expected
intel_dump_decode runs, rejects unknown options as expected
---
v1 -> v2:
- Rename all patch subjects
- Split tools/intel_gtt into two patches: tools/intel_gtt and tools/intel_dump_decode
- Split tools/lsgpu into lib/igt_core: move igt_load_igtrc to igt_device_scan + tools/lsgpu
- Shorten tools/intel_gpu_top subject (was over 72 chars)
Sebastian Brzezinka (31):
lib/igt_tools_stub: introduce static sub-library for tools
lib/igt_stats: introduce static sub-library for tools
tools/igt_stats: link with minimal sub-libraries
tools/intel_firmware_decode: link with minimal sub-libraries
lib/igt_tools_stub: add stubs needed by tools
lib/igt_drm_stub: introduce for tools needing driver detection
lib/igt_device_scan: wire to use static sub-libraries
tools/intel_gpu_top: add explicit drm/tools-stub deps
lib/igt_halffloat: introduce static sub-library for tools
lib/i915/intel_decode: introduce static sub-library for tools
lib/intel_mmio: introduce lib_igt_reg_tools static sub-library for
tools
tools/intel_gpu_frequency: link with minimal sub-libraries
lib/i915/intel_decode: replace igt.h with minimal headers
tools/intel_stepping: link with minimal sub-libraries
tools/intel_gtt: link with minimal sub-libraries
tools/intel_dump_decode: link with minimal sub-libraries
tools/intel_error_decode: link with minimal sub-libraries
tools/intel_vbt_decode: link with minimal sub-libraries
tools/intel_backlight: link with minimal sub-libraries
tools/intel_lid: link with minimal sub-libraries
tools/intel_gpu_time: link with minimal sub-libraries
tools/intel_audio_dump: link with minimal sub-libraries
tools/intel_forcewaked: link with minimal sub-libraries
tools/intel_guc_logger: link with minimal sub-libraries
tools/intel_infoframes: link with minimal sub-libraries
tools/intel_panel_fitter: link with minimal sub-libraries
tools/intel_watermark: link with minimal sub-libraries
tools/intel_display_poller: link with minimal sub-libraries
tools/intel_gvtg_test: link with minimal sub-libraries
lib/igt_core: move igt_load_igtrc to igt_device_scan
tools/lsgpu: link with minimal sub-libraries
lib/i915/intel_decode.c | 4 +-
lib/igt_core.c | 47 --------------
lib/igt_core.h | 2 -
lib/igt_device_scan.c | 48 ++++++++++++++
lib/igt_device_scan.h | 2 +
lib/igt_drm_stub.c | 132 +++++++++++++++++++++++++++++++++++++++
lib/igt_tools_stub.c | 77 ++++++++++++++++++++---
lib/meson.build | 66 +++++++++++++++++++-
tools/intel_guc_logger.c | 21 ++++++-
tools/intel_gvtg_test.c | 2 +-
tools/lsgpu.c | 2 +-
tools/meson.build | 126 ++++++++++++++++++++++++++++++-------
12 files changed, 443 insertions(+), 86 deletions(-)
create mode 100644 lib/igt_drm_stub.c
--
2.53.0
next reply other threads:[~2026-07-03 14:29 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 14:28 Sebastian Brzezinka [this message]
2026-07-03 14:28 ` [PATCH i-g-t v2 01/31] lib/igt_tools_stub: introduce static sub-library for tools Sebastian Brzezinka
2026-07-03 19:21 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 02/31] lib/igt_stats: " Sebastian Brzezinka
2026-07-03 19:22 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 03/31] tools/igt_stats: link with minimal sub-libraries Sebastian Brzezinka
2026-07-03 19:23 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 04/31] tools/intel_firmware_decode: " Sebastian Brzezinka
2026-07-03 19:24 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 05/31] lib/igt_tools_stub: add stubs needed by tools Sebastian Brzezinka
2026-07-03 19:40 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 06/31] lib/igt_drm_stub: introduce for tools needing driver detection Sebastian Brzezinka
2026-07-03 20:31 ` Krzysztof Niemiec
2026-07-06 10:06 ` Kamil Konieczny
2026-07-03 14:28 ` [PATCH i-g-t v2 07/31] lib/igt_device_scan: wire to use static sub-libraries Sebastian Brzezinka
2026-07-03 20:56 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 08/31] tools/intel_gpu_top: add explicit drm/tools-stub deps Sebastian Brzezinka
2026-07-03 20:57 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 09/31] lib/igt_halffloat: introduce static sub-library for tools Sebastian Brzezinka
2026-07-03 20:58 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 10/31] lib/i915/intel_decode: " Sebastian Brzezinka
2026-07-03 20:58 ` Krzysztof Niemiec
2026-07-06 10:58 ` Kamil Konieczny
2026-07-03 14:28 ` [PATCH i-g-t v2 11/31] lib/intel_mmio: introduce lib_igt_reg_tools " Sebastian Brzezinka
2026-07-03 20:59 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 12/31] tools/intel_gpu_frequency: link with minimal sub-libraries Sebastian Brzezinka
2026-07-03 21:00 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 13/31] lib/i915/intel_decode: replace igt.h with minimal headers Sebastian Brzezinka
2026-07-03 21:02 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 14/31] tools/intel_stepping: link with minimal sub-libraries Sebastian Brzezinka
2026-07-03 21:03 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 15/31] tools/intel_gtt: " Sebastian Brzezinka
2026-07-03 21:04 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 16/31] tools/intel_dump_decode: " Sebastian Brzezinka
2026-07-03 21:04 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 17/31] tools/intel_error_decode: " Sebastian Brzezinka
2026-07-03 21:04 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 18/31] tools/intel_vbt_decode: " Sebastian Brzezinka
2026-07-03 21:04 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 19/31] tools/intel_backlight: " Sebastian Brzezinka
2026-07-03 21:05 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 20/31] tools/intel_lid: " Sebastian Brzezinka
2026-07-03 21:05 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 21/31] tools/intel_gpu_time: " Sebastian Brzezinka
2026-07-03 21:06 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 22/31] tools/intel_audio_dump: " Sebastian Brzezinka
2026-07-03 21:06 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 23/31] tools/intel_forcewaked: " Sebastian Brzezinka
2026-07-03 21:06 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 24/31] tools/intel_guc_logger: " Sebastian Brzezinka
2026-07-03 21:08 ` Krzysztof Niemiec
2026-07-03 14:28 ` [PATCH i-g-t v2 25/31] tools/intel_infoframes: " Sebastian Brzezinka
2026-07-03 21:08 ` Krzysztof Niemiec
2026-07-03 14:29 ` [PATCH i-g-t v2 26/31] tools/intel_panel_fitter: " Sebastian Brzezinka
2026-07-03 21:08 ` Krzysztof Niemiec
2026-07-03 14:29 ` [PATCH i-g-t v2 27/31] tools/intel_watermark: " Sebastian Brzezinka
2026-07-03 21:08 ` Krzysztof Niemiec
2026-07-03 14:29 ` [PATCH i-g-t v2 28/31] tools/intel_display_poller: " Sebastian Brzezinka
2026-07-03 21:09 ` Krzysztof Niemiec
2026-07-03 14:29 ` [PATCH i-g-t v2 29/31] tools/intel_gvtg_test: " Sebastian Brzezinka
2026-07-03 21:10 ` Krzysztof Niemiec
2026-07-03 14:29 ` [PATCH i-g-t v2 30/31] lib/igt_core: move igt_load_igtrc to igt_device_scan Sebastian Brzezinka
2026-07-03 21:20 ` Krzysztof Niemiec
2026-07-03 14:29 ` [PATCH i-g-t v2 31/31] tools/lsgpu: link with minimal sub-libraries Sebastian Brzezinka
2026-07-03 21:22 ` Krzysztof Niemiec
2026-07-06 11:07 ` Kamil Konieczny
2026-07-03 20:55 ` [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Krzysztof Niemiec
2026-07-06 8:37 ` Krzysztof Karas
2026-07-06 11:18 ` Kamil Konieczny
2026-07-03 21:27 ` Krzysztof Niemiec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1783088106.git.sebastian.brzezinka@intel.com \
--to=sebastian.brzezinka@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=krzysztof.karas@intel.com \
--cc=krzysztof.niemiec@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox