Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library
@ 2026-07-03 14:28 Sebastian Brzezinka
  2026-07-03 14:28 ` [PATCH i-g-t v2 01/31] lib/igt_tools_stub: introduce static sub-library for tools Sebastian Brzezinka
                   ` (32 more replies)
  0 siblings, 33 replies; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec

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


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 01/31] lib/igt_tools_stub: introduce static sub-library for tools
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (31 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

Add lib_igt_tools_stub built from igt_tools_stub.c. Tools that need
minimal IGT assert/logging stubs can link this without pulling in the
full libigt.so stack.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index d1289a5e0..e95b29d49 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -349,6 +349,13 @@ lib_igt_perf_build = static_library('igt_perf',
 lib_igt_perf = declare_dependency(link_with : lib_igt_perf_build,
 				  include_directories : inc)
 
+lib_igt_tools_stub_build = static_library('igt_tools_stub',
+	['igt_tools_stub.c'],
+	include_directories : inc)
+
+lib_igt_tools_stub = declare_dependency(link_with : lib_igt_tools_stub_build,
+					include_directories : inc)
+
 scan_dep = [
 	glib,
 	libpci,
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 02/31] lib/igt_stats: introduce static sub-library for tools
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
  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 14:28 ` 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
                   ` (30 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

Add lib_igt_stats built from igt_stats.c. Tools that need the
statistics helpers can link this without pulling in the full
libigt.so stack.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index e95b29d49..a57c1eb8d 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -397,6 +397,13 @@ lib_igt_profiling_build = static_library('igt_profiling',
 lib_igt_profiling = declare_dependency(link_with : lib_igt_profiling_build,
 				        include_directories : inc)
 
+lib_igt_stats_build = static_library('igt_stats_tools',
+	['igt_stats.c'],
+	include_directories : inc)
+
+lib_igt_stats = declare_dependency(link_with : lib_igt_stats_build,
+				   include_directories : inc)
+
 i915_perf_files = [
   'igt_list.c',
   'i915/perf.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 03/31] tools/igt_stats: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
  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 14:28 ` [PATCH i-g-t v2 02/31] lib/igt_stats: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (29 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

igt_stats only needs the statistics helpers and a small assert stub.
Link it against lib_igt_stats and lib_igt_tools_stub instead of the
full libigt.so stack.

ldd before: 35  (ldd | wc -l)
ldd after:   4  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 8185ba160..286a718c8 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -14,7 +14,6 @@ endforeach
 tools_progs = [
 	'igt_facts',
 	'igt_power',
-	'igt_stats',
 	'intel_audio_dump',
 	'intel_backlight',
 	'intel_bios_dumper',
@@ -58,6 +57,11 @@ foreach prog : tools_progs
 		   install : true)
 endforeach
 
+executable('igt_stats', 'igt_stats.c',
+	   dependencies : [lib_igt_stats, lib_igt_tools_stub, math],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 04/31] tools/intel_firmware_decode: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (2 preceding siblings ...)
  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 14:28 ` 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
                   ` (28 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_firmware_decode only needs the lightweight assert stub used by
igt_assert(), so the full libigt.so stack is unnecessary.

Switch to linking against lib_igt_tools_stub only.

ldd before: 35  (ldd | wc -l)
ldd after:   3   (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 286a718c8..4c67dde4f 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -24,7 +24,6 @@ tools_progs = [
 	'intel_error_decode',
 	'intel_forcewaked',
 	'intel_gpu_frequency',
-	'intel_firmware_decode',
 	'intel_framebuffer_dump',
 	'intel_gpu_time',
 	'intel_gtt',
@@ -62,6 +61,11 @@ executable('igt_stats', 'igt_stats.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_firmware_decode', 'intel_firmware_decode.c',
+	   dependencies : [lib_igt_tools_stub],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 05/31] lib/igt_tools_stub: add stubs needed by tools
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (3 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 04/31] tools/intel_firmware_decode: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (27 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

Add stubs for functions used by tools when linking without the
full libigt.so: __igt_skip_check, igt_exit, igt_debugfs_open and
igt_open_forcewake_handle_for_pcidev.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/igt_tools_stub.c | 77 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 70 insertions(+), 7 deletions(-)

diff --git a/lib/igt_tools_stub.c b/lib/igt_tools_stub.c
index 9a0ec6217..71c850e2f 100644
--- a/lib/igt_tools_stub.c
+++ b/lib/igt_tools_stub.c
@@ -21,12 +21,26 @@
  * IN THE SOFTWARE.
  *
  */
+#include <fcntl.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
+#include <unistd.h>
+
 #include "igt_core.h"
+#include "igt_debugfs.h"
 
-/* Stub for igt_log, this stub will simply print the msg on stderr device.
- * Domain and log level are ignored.
+/*
+ * Forward declaration only - avoids pulling in the heavy igt_gt.h header.
+ * The type is used as an opaque pointer; this stub always returns -1.
  */
+struct pci_device;
+int igt_open_forcewake_handle_for_pcidev(const struct pci_device *pci_dev);
 
+/* Stub for igt_log: print message to stderr; domain and log level are ignored. */
 void igt_log(const char *domain, enum igt_log_level level, const char *format, ...)
 {
 	va_list args;
@@ -36,11 +50,7 @@ void igt_log(const char *domain, enum igt_log_level level, const char *format, .
 	va_end(args);
 }
 
-
-/* Stub for __igt_fail_assert, this stub will simply print the msg on stderr device and
- * exit the application, domain and log level are ignored.
- */
-
+/* Stub for __igt_fail_assert: print failed assertion to stderr and exit. */
 void __igt_fail_assert(const char *domain, const char *file,
 		       const int line, const char *func, const char *assertion,
 		       const char *format, ...)
@@ -49,3 +59,56 @@ void __igt_fail_assert(const char *domain, const char *file,
 		func, assertion);
 	exit(1);
 }
+
+/* Stub for __igt_skip_check: print skip reason to stderr and exit with skip code. */
+void __igt_skip_check(const char *file, const int line,
+		      const char *func, const char *check, const char *format, ...)
+{
+	fprintf(stderr, "%s: %d %s Skipped: %s", file, line, func, check);
+	if (format) {
+		va_list args;
+
+		fprintf(stderr, ": ");
+		va_start(args, format);
+		vfprintf(stderr, format, args);
+		va_end(args);
+	}
+	fprintf(stderr, "\n");
+	exit(77);
+}
+
+/* Stub for igt_exit: tools use exit(0) rather than the full igt teardown sequence. */
+__noreturn void igt_exit(void)
+{
+	exit(0);
+}
+
+/* Stub for igt_debugfs_open: open a debugfs entry for a DRM device directly by path.
+ * device == -1 follows the igt_debugfs_path() convention of defaulting to
+ * the first DRM device (dri/0).  When a valid fd is given, the DRM minor is
+ * resolved via fstat() so the correct dri/<minor> directory is used.
+ */
+int igt_debugfs_open(int device, const char *filename, int mode)
+{
+	char path[PATH_MAX];
+	int drm_minor = 0;
+
+	if (device >= 0) {
+		struct stat st;
+
+		if (fstat(device, &st) == 0 && S_ISCHR(st.st_mode))
+			drm_minor = minor(st.st_rdev);
+	}
+
+	snprintf(path, sizeof(path),
+		 "/sys/kernel/debug/dri/%d/%s", drm_minor, filename);
+	return open(path, mode);
+}
+
+/* Stub for igt_open_forcewake_handle_for_pcidev: in tool context the driver
+ * keeps the GPU awake; no forcewake handle needed.
+ */
+int igt_open_forcewake_handle_for_pcidev(const struct pci_device *pci_dev)
+{
+	return -1;
+}
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 06/31] lib/igt_drm_stub: introduce for tools needing driver detection
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (4 preceding siblings ...)
  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 14:28 ` 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
                   ` (26 subsequent siblings)
  32 siblings, 2 replies; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

Add drm/pciaccess-dependent stubs into a new igt_drm_stub.c.  This avoids
pulling libdrm into tools that only need dep-free logging and exit stubs.

The new lib_igt_drm_stub static sub-library provides: igt_pci_system_init,
is_i915_device, is_intel_device, xe_dev_id and __drm_open_driver.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/igt_drm_stub.c | 132 +++++++++++++++++++++++++++++++++++++++++++++
 lib/meson.build    |   9 ++++
 2 files changed, 141 insertions(+)
 create mode 100644 lib/igt_drm_stub.c

diff --git a/lib/igt_drm_stub.c b/lib/igt_drm_stub.c
new file mode 100644
index 000000000..f8ac3a992
--- /dev/null
+++ b/lib/igt_drm_stub.c
@@ -0,0 +1,132 @@
+/*
+ * Copyright © 2026 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/*
+ * Minimal DRM/PCI stubs for tools that need driver detection and device
+ * opening but do not link the full libigt.so.  Requires libdrm and pciaccess.
+ */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <pciaccess.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
+#include <unistd.h>
+#include <xf86drm.h>
+
+#include "drmtest.h"
+
+int igt_pci_system_init(void)
+{
+	return pci_system_init();
+}
+
+static bool driver_name_matches(int fd, const char *name)
+{
+	drmVersionPtr version;
+	bool match = false;
+
+	version = drmGetVersion(fd);
+	if (!version)
+		return false;
+
+	match = version->name_len > 0 && !strcmp(version->name, name);
+	drmFreeVersion(version);
+
+	return match;
+}
+
+bool is_i915_device(int fd)
+{
+	return driver_name_matches(fd, "i915");
+}
+
+bool is_intel_device(int fd)
+{
+	return is_i915_device(fd) || driver_name_matches(fd, "xe");
+}
+
+static uint16_t read_pci_device_id(int fd)
+{
+	char path[PATH_MAX], buf[32];
+	struct stat st;
+	int sysfs, len;
+	unsigned int devid;
+
+	if (fstat(fd, &st) || !S_ISCHR(st.st_mode))
+		return 0;
+
+	snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/device",
+		 major(st.st_rdev), minor(st.st_rdev));
+	sysfs = open(path, O_RDONLY);
+	if (sysfs < 0)
+		return 0;
+
+	len = read(sysfs, buf, sizeof(buf) - 1);
+	close(sysfs);
+	if (len <= 0)
+		return 0;
+
+	buf[len] = '\0';
+	if (sscanf(buf, "0x%x", &devid) != 1)
+		return 0;
+
+	return devid;
+}
+
+/* Matches the declaration in lib/xe/xe_query.h declared here to satisfy
+ * -Wmissing-prototypes without pulling in the heavy xe_query.h header.
+ */
+uint16_t xe_dev_id(int fd);
+uint16_t xe_dev_id(int fd)
+{
+	return read_pci_device_id(fd);
+}
+
+int __drm_open_driver(int chipset)
+{
+	char path[PATH_MAX];
+	int fd;
+
+	for (int i = 0; i < 16; i++) {
+		snprintf(path, sizeof(path), "/dev/dri/card%d", i);
+		fd = open(path, O_RDWR | O_CLOEXEC);
+		if (fd < 0)
+			continue;
+
+		if ((chipset == DRIVER_INTEL && is_i915_device(fd)) ||
+		    (chipset == DRIVER_XE && driver_name_matches(fd, "xe")) ||
+		    (chipset == DRIVER_ANY && is_intel_device(fd)))
+			return fd;
+
+		close(fd);
+	}
+
+	errno = ENODEV;
+	return -1;
+}
diff --git a/lib/meson.build b/lib/meson.build
index a57c1eb8d..484a912d7 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -356,6 +356,15 @@ lib_igt_tools_stub_build = static_library('igt_tools_stub',
 lib_igt_tools_stub = declare_dependency(link_with : lib_igt_tools_stub_build,
 					include_directories : inc)
 
+lib_igt_drm_stub_build = static_library('igt_drm_stub',
+	['igt_drm_stub.c'],
+	dependencies : [libdrm, pciaccess],
+	include_directories : inc)
+
+lib_igt_drm_stub = declare_dependency(link_with : lib_igt_drm_stub_build,
+				      dependencies : [libdrm, pciaccess],
+				      include_directories : inc)
+
 scan_dep = [
 	glib,
 	libpci,
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 07/31] lib/igt_device_scan: wire to use static sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (5 preceding siblings ...)
  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 14:28 ` 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
                   ` (25 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

Drop the directly compiled igt_tools_stub.c from lib_igt_device_scan
and link lib_igt_tools_stub and lib_igt_drm_stub instead. Compiling
igt_tools_stub.c directly would cause duplicate symbol errors when a
tool links both lib_igt_device_scan and lib_igt_tools_stub.

Add libdrm and pciaccess to scan_dep so tools linking lib_igt_device_scan
pick up the right dependencies.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/meson.build | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/meson.build b/lib/meson.build
index 484a912d7..2c1fbcd43 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -367,22 +367,24 @@ lib_igt_drm_stub = declare_dependency(link_with : lib_igt_drm_stub_build,
 
 scan_dep = [
 	glib,
+	libdrm,
 	libpci,
 	libudev,
+	pciaccess,
 ]
 
 lib_igt_device_scan_build = static_library('igt_device_scan',
 	['igt_device_scan.c',
 	'igt_list.c',
 	'igt_map.c',
-	'igt_tools_stub.c',
 	'intel_device_info.c',
 	'intel_cmds_info.c',
 	],
-	dependencies : scan_dep,
+	dependencies : [scan_dep, lib_igt_drm_stub, lib_igt_tools_stub],
 	include_directories : inc)
 
 lib_igt_device_scan = declare_dependency(link_with : lib_igt_device_scan_build,
+				  dependencies : [libdrm, pciaccess],
 				  include_directories : inc)
 
 lib_igt_drm_clients_build = static_library('igt_drm_clients',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 08/31] tools/intel_gpu_top: add explicit drm/tools-stub deps
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (6 preceding siblings ...)
  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 14:28 ` 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
                   ` (24 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

Meson does not automatically propagate static library dependencies
to executables via link_with.  lib_igt_device_scan internally links
lib_igt_drm_stub and lib_igt_tools_stub but does not reexport them
through its declare_dependency.  As a result intel_gpu_top must list
them explicitly, otherwise the linker cannot resolve symbols such as
is_i915_device and igt_log at final link time.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 4c67dde4f..53aa31056 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -105,7 +105,8 @@ 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])
+	   dependencies : [lib_igt_perf,lib_igt_device_scan,lib_igt_drm_clients,lib_igt_drm_fdinfo,
+	                   lib_igt_drm_stub, lib_igt_tools_stub, math])
 
 executable('amd_hdmi_compliance', 'amd_hdmi_compliance.c',
 	   dependencies : [tool_deps],
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 09/31] lib/igt_halffloat: introduce static sub-library for tools
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (7 preceding siblings ...)
  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 14:28 ` 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
                   ` (23 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

Add lib_igt_halffloat backed by igt_halffloat.c with a math dependency.
Tools that use half-float conversion (e.g. intel_vbt_decode) can link
this minimal library instead of the full libigt.so.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index 2c1fbcd43..93db217f8 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -415,6 +415,14 @@ lib_igt_stats_build = static_library('igt_stats_tools',
 lib_igt_stats = declare_dependency(link_with : lib_igt_stats_build,
 				   include_directories : inc)
 
+lib_igt_halffloat_build = static_library('igt_halffloat',
+	['igt_halffloat.c'],
+	include_directories : inc)
+
+lib_igt_halffloat = declare_dependency(link_with : lib_igt_halffloat_build,
+				       dependencies : [math],
+				       include_directories : inc)
+
 i915_perf_files = [
   'igt_list.c',
   'i915/perf.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 10/31] lib/i915/intel_decode: introduce static sub-library for tools
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (8 preceding siblings ...)
  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 14:28 ` 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
                   ` (22 subsequent siblings)
  32 siblings, 2 replies; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

Add lib_i915_decode built from i915/intel_decode.c and instdone.c.
This lets tools like intel_error_decode link only the decode logic
without pulling in the full libigt.so.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/meson.build | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index 93db217f8..ba4ece3a2 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -423,6 +423,18 @@ lib_igt_halffloat = declare_dependency(link_with : lib_igt_halffloat_build,
 				       dependencies : [math],
 				       include_directories : inc)
 
+lib_i915_decode_build = static_library('i915_decode',
+	['i915/intel_decode.c',
+	 'instdone.c',
+	],
+	dependencies : [lib_igt_chipset],
+	include_directories : inc)
+
+lib_i915_decode = declare_dependency(link_with : lib_i915_decode_build,
+				     dependencies : [lib_igt_chipset,
+				                     lib_igt_tools_stub],
+				     include_directories : inc)
+
 i915_perf_files = [
   'igt_list.c',
   'i915/perf.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 11/31] lib/intel_mmio: introduce lib_igt_reg_tools static sub-library for tools
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (9 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 10/31] lib/i915/intel_decode: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (21 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

Add lib_igt_reg_tools built from intel_mmio.c, intel_reg_map.c and
intel_iosf.c.  Tools that need register access (e.g. intel_reg) can link
this library without pulling in the full libigt.so.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/meson.build | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index ba4ece3a2..43ae4ce66 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -435,6 +435,21 @@ lib_i915_decode = declare_dependency(link_with : lib_i915_decode_build,
 				                     lib_igt_tools_stub],
 				     include_directories : inc)
 
+lib_igt_reg_tools_build = static_library('igt_reg_tools',
+	['intel_mmio.c',
+	 'intel_reg_map.c',
+	 'intel_iosf.c',
+	],
+	dependencies : [pciaccess, libdrm],
+	include_directories : inc)
+
+lib_igt_reg_tools = declare_dependency(link_with : lib_igt_reg_tools_build,
+				       dependencies : [lib_igt_chipset,
+				                       lib_igt_tools_stub,
+				                       lib_igt_drm_stub,
+				                       pciaccess, libdrm],
+				       include_directories : inc)
+
 i915_perf_files = [
   'igt_list.c',
   'i915/perf.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 12/31] tools/intel_gpu_frequency: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (10 preceding siblings ...)
  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 14:28 ` 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
                   ` (20 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_gpu_frequency needs only intel_gen/devid helpers and a DRM device
opener to query the GPU frequency.  Link it against lib_igt_chipset for
the devid helpers and lib_igt_drm_stub for driver detection and device
opening, instead of the full libigt.so stack.

ldd before: 35  (ldd intel_gpu_frequency | wc -l)
ldd after:   5  (ldd intel_gpu_frequency | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 53aa31056..01400f53e 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -23,7 +23,6 @@ tools_progs = [
 	'intel_dump_decode',
 	'intel_error_decode',
 	'intel_forcewaked',
-	'intel_gpu_frequency',
 	'intel_framebuffer_dump',
 	'intel_gpu_time',
 	'intel_gtt',
@@ -66,6 +65,11 @@ executable('intel_firmware_decode', 'intel_firmware_decode.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_gpu_frequency', 'intel_gpu_frequency.c',
+	   dependencies : [lib_igt_chipset, lib_igt_tools_stub, lib_igt_drm_stub],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 13/31] lib/i915/intel_decode: replace igt.h with minimal headers
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (11 preceding siblings ...)
  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 14:28 ` 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
                   ` (19 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_decode.c only uses two symbols from the IGT: intel_gen()
and intel_get_device_info(), both provided by intel_chipset.h.
The DRM_PRINTFLIKE macro used for the instr_out() format attribute is
provided by xf86drm.h.

This is a prerequisite for building intel_decode.c into a static
sub-library (lib_i915_decode) that tools can link without pulling in
the full libigt.so stack.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/i915/intel_decode.c | 4 ++--
 lib/meson.build         | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/i915/intel_decode.c b/lib/i915/intel_decode.c
index b78993c47..d4a4da4da 100644
--- a/lib/i915/intel_decode.c
+++ b/lib/i915/intel_decode.c
@@ -28,8 +28,8 @@
 #include <stdbool.h>
 #include <stdarg.h>
 #include <string.h>
-
-#include "igt.h"
+#include <xf86drm.h>
+#include "intel_chipset.h"
 #include "intel_decode.h"
 
 /* Struct for tracking intel_decode state. */
diff --git a/lib/meson.build b/lib/meson.build
index 43ae4ce66..aa8eae68b 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -432,7 +432,9 @@ lib_i915_decode_build = static_library('i915_decode',
 
 lib_i915_decode = declare_dependency(link_with : lib_i915_decode_build,
 				     dependencies : [lib_igt_chipset,
-				                     lib_igt_tools_stub],
+				                     lib_igt_tools_stub,
+				                     lib_igt_drm_stub,
+				                     pciaccess],
 				     include_directories : inc)
 
 lib_igt_reg_tools_build = static_library('igt_reg_tools',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 14/31] tools/intel_stepping: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (12 preceding siblings ...)
  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 14:28 ` 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
                   ` (18 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_stepping only needs the chipset tables and the small tool stub
support used by those helpers, not the full libigt.so stack.

Switch to linking against lib_igt_chipset, lib_igt_tools_stub and
libpciaccess.

ldd before: 35  (ldd | wc -l)
ldd after:   4  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 01400f53e..8eb346321 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -36,7 +36,6 @@ tools_progs = [
 	'intel_pm_rpm',
 	'intel_reg_checker',
 	'intel_residency',
-	'intel_stepping',
 	'intel_tiling_detect',
 	'intel_vbt_decode',
 	'intel_watermark',
@@ -70,6 +69,12 @@ executable('intel_gpu_frequency', 'intel_gpu_frequency.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_stepping', 'intel_stepping.c',
+	   dependencies : [lib_igt_chipset, lib_igt_tools_stub, lib_igt_drm_stub,
+	                    pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 15/31] tools/intel_gtt: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (13 preceding siblings ...)
  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 14:28 ` 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
                   ` (17 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_gtt only needs the chipset helpers plus the small tool stubs they
rely on. The full libigt.so dependency chain is unnecessary.

Switch to linking against lib_igt_chipset, lib_igt_tools_stub,
lib_igt_drm_stub, pciaccess and libdrm.

ldd before: 35  (ldd | wc -l)
ldd after:   5  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 8eb346321..a3fef87a9 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -25,7 +25,6 @@ tools_progs = [
 	'intel_forcewaked',
 	'intel_framebuffer_dump',
 	'intel_gpu_time',
-	'intel_gtt',
 	'intel_guc_logger',
 	'intel_hdcp',
 	'intel_infoframes',
@@ -75,6 +74,12 @@ executable('intel_stepping', 'intel_stepping.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_gtt', 'intel_gtt.c',
+	   dependencies : [lib_igt_chipset, lib_igt_tools_stub, lib_igt_drm_stub,
+	                    pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 16/31] tools/intel_dump_decode: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (14 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 15/31] tools/intel_gtt: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (16 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_dump_decode only needs the i915 decoder. Link it against
lib_i915_decode instead of the full libigt.so stack.

ldd before: 35  (ldd | wc -l)
ldd after:   4  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index a3fef87a9..467b8eea1 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -20,7 +20,6 @@ tools_progs = [
 	'intel_display_bandwidth',
 	'intel_display_crc',
 	'intel_display_poller',
-	'intel_dump_decode',
 	'intel_error_decode',
 	'intel_forcewaked',
 	'intel_framebuffer_dump',
@@ -80,6 +79,11 @@ executable('intel_gtt', 'intel_gtt.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_dump_decode', 'intel_dump_decode.c',
+	   dependencies : [lib_i915_decode],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 17/31] tools/intel_error_decode: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (15 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 16/31] tools/intel_dump_decode: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (15 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_error_decode needs the batch decoder, chipset tables and zlib for
compressed error state handling, but not the full libigt.so stack.

Switch to linking against lib_i915_decode plus the minimal helper
libraries it relies on.

ldd before: 35  (ldd | wc -l)
ldd after:   4  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 467b8eea1..b04754c5e 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -20,7 +20,6 @@ tools_progs = [
 	'intel_display_bandwidth',
 	'intel_display_crc',
 	'intel_display_poller',
-	'intel_error_decode',
 	'intel_forcewaked',
 	'intel_framebuffer_dump',
 	'intel_gpu_time',
@@ -84,6 +83,11 @@ executable('intel_dump_decode', 'intel_dump_decode.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_error_decode', 'intel_error_decode.c',
+	   dependencies : [lib_i915_decode, pciaccess, zlib, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 18/31] tools/intel_vbt_decode: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (16 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 17/31] tools/intel_error_decode: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (14 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_vbt_decode only needs the chipset tables, half-float conversion
helpers and the lightweight tool stubs used by those helpers.

Switch to linking against lib_igt_chipset, lib_igt_halffloat and
lib_igt_tools_stub instead of the full libigt.so stack.

ldd before: 35  (ldd | wc -l)
ldd after:   4  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index b04754c5e..46cf1a717 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -34,7 +34,6 @@ tools_progs = [
 	'intel_reg_checker',
 	'intel_residency',
 	'intel_tiling_detect',
-	'intel_vbt_decode',
 	'intel_watermark',
 	'intel_gem_info',
 	'intel_gvtg_test',
@@ -88,6 +87,11 @@ executable('intel_error_decode', 'intel_error_decode.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_vbt_decode', 'intel_vbt_decode.c',
+	   dependencies : [lib_igt_chipset, lib_igt_halffloat, lib_igt_tools_stub, pciaccess, libdrm, math],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 19/31] tools/intel_backlight: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (17 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 18/31] tools/intel_vbt_decode: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (13 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_backlight only needs MMIO/register access helpers and the chipset
metadata they use. The full libigt.so stack is unnecessary.

Add lib_igt_reg_tools and link intel_backlight against it instead of
libigt.so.

ldd before: 35  (ldd | wc -l)
ldd after:   5  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 46cf1a717..8899a5b49 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -15,7 +15,6 @@ tools_progs = [
 	'igt_facts',
 	'igt_power',
 	'intel_audio_dump',
-	'intel_backlight',
 	'intel_bios_dumper',
 	'intel_display_bandwidth',
 	'intel_display_crc',
@@ -92,6 +91,11 @@ executable('intel_vbt_decode', 'intel_vbt_decode.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_backlight', 'intel_backlight.c',
+	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 20/31] tools/intel_lid: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (18 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 19/31] tools/intel_backlight: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (12 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_lid only needs the register/MMIO helper subset, not the full
libigt.so stack.

Switch to linking against lib_igt_reg_tools.

ldd before: 35  (ldd | wc -l)
ldd after:   5  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 8899a5b49..0978f8f11 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -25,7 +25,6 @@ tools_progs = [
 	'intel_guc_logger',
 	'intel_hdcp',
 	'intel_infoframes',
-	'intel_lid',
 	'intel_opregion_decode',
 	'intel_panel_fitter',
 	'intel_perf_counters',
@@ -96,6 +95,11 @@ executable('intel_backlight', 'intel_backlight.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_lid', 'intel_lid.c',
+	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 21/31] tools/intel_gpu_time: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (19 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 20/31] tools/intel_lid: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (11 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_gpu_time only needs the register/MMIO helper subset, not the full
libigt.so stack.

Switch to linking against lib_igt_reg_tools.

ldd before: 35  (ldd | wc -l)
ldd after:   5   (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 0978f8f11..2e8ceea36 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -21,7 +21,6 @@ tools_progs = [
 	'intel_display_poller',
 	'intel_forcewaked',
 	'intel_framebuffer_dump',
-	'intel_gpu_time',
 	'intel_guc_logger',
 	'intel_hdcp',
 	'intel_infoframes',
@@ -100,6 +99,11 @@ executable('intel_lid', 'intel_lid.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_gpu_time', 'intel_gpu_time.c',
+	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 22/31] tools/intel_audio_dump: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (20 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 21/31] tools/intel_gpu_time: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (10 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_audio_dump only needs the register/MMIO helper subset, not the
full libigt.so stack.

Switch to linking against lib_igt_reg_tools.

ldd before: 35  (ldd | wc -l)
ldd after:   5  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 2e8ceea36..f9bbb41a9 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -14,7 +14,6 @@ endforeach
 tools_progs = [
 	'igt_facts',
 	'igt_power',
-	'intel_audio_dump',
 	'intel_bios_dumper',
 	'intel_display_bandwidth',
 	'intel_display_crc',
@@ -104,6 +103,11 @@ executable('intel_gpu_time', 'intel_gpu_time.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_audio_dump', 'intel_audio_dump.c',
+	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 23/31] tools/intel_forcewaked: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (21 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 22/31] tools/intel_audio_dump: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (9 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_forcewaked only needs the register/MMIO helper subset, not the
full libigt.so stack.

Switch to linking against lib_igt_reg_tools.

ldd before: 35  (ldd | wc -l)
ldd after:   5  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index f9bbb41a9..15bd40dec 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -18,7 +18,6 @@ tools_progs = [
 	'intel_display_bandwidth',
 	'intel_display_crc',
 	'intel_display_poller',
-	'intel_forcewaked',
 	'intel_framebuffer_dump',
 	'intel_guc_logger',
 	'intel_hdcp',
@@ -108,6 +107,11 @@ executable('intel_audio_dump', 'intel_audio_dump.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_forcewaked', 'intel_forcewaked.c',
+	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 24/31] tools/intel_guc_logger: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (22 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 23/31] tools/intel_forcewaked: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (8 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_guc_logger only needs core logging/assert helpers and debugfs
access, not the full libigt.so stack. Replace the monolithic include
with the minimal headers and link against lib_igt_tools_stub.

The tool previously used igt_simple_main_args() for option parsing, which
is part of libigt.so and cannot be used without it. Replace it with a
direct getopt_long() loop. As part of this: add a 'help' long option, a
usage string header, and a default case that calls exit(1) on unrecognised
options, behaviour that igt_simple_main_args() provided implicitly.

ldd before: 35  (ldd | wc -l)
ldd after:   3  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/intel_guc_logger.c | 21 ++++++++++++++++++---
 tools/meson.build        |  6 +++++-
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/tools/intel_guc_logger.c b/tools/intel_guc_logger.c
index 629b4e660..3990aef87 100644
--- a/tools/intel_guc_logger.c
+++ b/tools/intel_guc_logger.c
@@ -38,9 +38,12 @@
 #include <sys/syscall.h>
 #include <sys/mman.h>
 #include <assert.h>
+#include <getopt.h>
 #include <pthread.h>
 
-#include "igt.h"
+#include "drmtest.h"
+#include "igt_core.h"
+#include "igt_debugfs.h"
 
 #define MB(x) ((uint64_t)(x) * 1024 * 1024)
 #ifndef PAGE_SIZE
@@ -367,6 +370,8 @@ static int parse_options(int opt, int opt_index, void *data)
 		discard_oldlogs = true;
 		igt_debug("old/boot-time logs will be discarded\n");
 		break;
+	default:
+		exit(1);
 	}
 
 	return 0;
@@ -382,10 +387,12 @@ static void process_command_line(int argc, char **argv)
 		{"polltimeout", required_argument, 0, 'p'},
 		{"size", required_argument, 0, 's'},
 		{"discard", no_argument, 0, 'd'},
+		{"help", no_argument, 0, 'h'},
 		{ 0, 0, 0, 0 }
 	};
 
 	const char *help =
+		"Usage: intel_guc_logger [options]\n"
 		"  -v --verbosity=level   verbosity level of GuC logging (0-3)\n"
 		"  -o --outputfile=name   name of the output file, including the location, where logs will be stored\n"
 		"  -b --buffers=num       number of buffers to be maintained on logger side for storing logs\n"
@@ -394,8 +401,16 @@ static void process_command_line(int argc, char **argv)
 		"  -s --size=MB           max size of output file in MBs after which logging will be stopped\n"
 		"  -d --discard           discard the old/boot-time logs before entering into the capture loop\n";
 
-	igt_simple_init_parse_opts(&argc, argv, "v:o:b:t:p:s:d", long_options,
-				   help, parse_options, NULL);
+	int opt, opt_index = 0;
+
+	while ((opt = getopt_long(argc, argv, "v:o:b:t:p:s:dh",
+				  long_options, &opt_index)) != -1) {
+		if (opt == 'h') {
+			printf("%s", help);
+			exit(0);
+		}
+		parse_options(opt, opt_index, NULL);
+	}
 }
 
 int main(int argc, char **argv)
diff --git a/tools/meson.build b/tools/meson.build
index 15bd40dec..32a345e9d 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -19,7 +19,6 @@ tools_progs = [
 	'intel_display_crc',
 	'intel_display_poller',
 	'intel_framebuffer_dump',
-	'intel_guc_logger',
 	'intel_hdcp',
 	'intel_infoframes',
 	'intel_opregion_decode',
@@ -112,6 +111,11 @@ executable('intel_forcewaked', 'intel_forcewaked.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_guc_logger', 'intel_guc_logger.c',
+	   dependencies : [lib_igt_tools_stub, libdrm, pthreads],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 25/31] tools/intel_infoframes: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (23 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 24/31] tools/intel_guc_logger: " Sebastian Brzezinka
@ 2026-07-03 14:28 ` 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
                   ` (7 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:28 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_infoframes only needs the register/MMIO helper subset, not the
full libigt.so stack.

Switch to linking against lib_igt_reg_tools.

ldd before: 35  (ldd | wc -l)
ldd after:   5  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 32a345e9d..a31b6d0ed 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -20,7 +20,6 @@ tools_progs = [
 	'intel_display_poller',
 	'intel_framebuffer_dump',
 	'intel_hdcp',
-	'intel_infoframes',
 	'intel_opregion_decode',
 	'intel_panel_fitter',
 	'intel_perf_counters',
@@ -116,6 +115,11 @@ executable('intel_guc_logger', 'intel_guc_logger.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_infoframes', 'intel_infoframes.c',
+	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 26/31] tools/intel_panel_fitter: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (24 preceding siblings ...)
  2026-07-03 14:28 ` [PATCH i-g-t v2 25/31] tools/intel_infoframes: " Sebastian Brzezinka
@ 2026-07-03 14:29 ` 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
                   ` (6 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:29 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_panel_fitter only needs the register/MMIO helper subset, not the
full libigt.so stack.

Switch to linking against lib_igt_reg_tools.

ldd before: 35  (ldd | wc -l)
ldd after:   5  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index a31b6d0ed..1a4e14ed3 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -21,7 +21,6 @@ tools_progs = [
 	'intel_framebuffer_dump',
 	'intel_hdcp',
 	'intel_opregion_decode',
-	'intel_panel_fitter',
 	'intel_perf_counters',
 	'intel_pm_rpm',
 	'intel_reg_checker',
@@ -120,6 +119,11 @@ executable('intel_infoframes', 'intel_infoframes.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_panel_fitter', 'intel_panel_fitter.c',
+	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 27/31] tools/intel_watermark: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (25 preceding siblings ...)
  2026-07-03 14:29 ` [PATCH i-g-t v2 26/31] tools/intel_panel_fitter: " Sebastian Brzezinka
@ 2026-07-03 14:29 ` 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
                   ` (5 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:29 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_watermark only needs the register/MMIO helper subset, not the full
libigt.so stack.

Switch to linking against lib_igt_reg_tools.

ldd before: 35  (ldd | wc -l)
ldd after:   5  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 1a4e14ed3..0cc62b54d 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -26,7 +26,6 @@ tools_progs = [
 	'intel_reg_checker',
 	'intel_residency',
 	'intel_tiling_detect',
-	'intel_watermark',
 	'intel_gem_info',
 	'intel_gvtg_test',
 	'dpcd_reg',
@@ -124,6 +123,11 @@ executable('intel_panel_fitter', 'intel_panel_fitter.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_watermark', 'intel_watermark.c',
+	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 28/31] tools/intel_display_poller: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (26 preceding siblings ...)
  2026-07-03 14:29 ` [PATCH i-g-t v2 27/31] tools/intel_watermark: " Sebastian Brzezinka
@ 2026-07-03 14:29 ` 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
                   ` (4 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:29 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_display_poller only needs the register/MMIO helper subset, not
the full libigt.so stack.

Switch to linking against lib_igt_reg_tools.

ldd before: 35  (ldd | wc -l)
ldd after:   5  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/meson.build b/tools/meson.build
index 0cc62b54d..2a084a0c4 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -17,7 +17,6 @@ tools_progs = [
 	'intel_bios_dumper',
 	'intel_display_bandwidth',
 	'intel_display_crc',
-	'intel_display_poller',
 	'intel_framebuffer_dump',
 	'intel_hdcp',
 	'intel_opregion_decode',
@@ -128,6 +127,11 @@ executable('intel_watermark', 'intel_watermark.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_display_poller', 'intel_display_poller.c',
+	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 29/31] tools/intel_gvtg_test: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (27 preceding siblings ...)
  2026-07-03 14:29 ` [PATCH i-g-t v2 28/31] tools/intel_display_poller: " Sebastian Brzezinka
@ 2026-07-03 14:29 ` 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
                   ` (3 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:29 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

intel_gvtg_test only needs the core assert/log/skip helpers provided by
igt_core plus the lightweight tool stubs. Replace the monolithic include
with the minimal header set and stop linking against libigt.so.

ldd before: 35  (ldd | wc -l)
ldd after:   3  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/intel_gvtg_test.c | 2 +-
 tools/meson.build       | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/intel_gvtg_test.c b/tools/intel_gvtg_test.c
index 408e703bf..fe8f7a599 100644
--- a/tools/intel_gvtg_test.c
+++ b/tools/intel_gvtg_test.c
@@ -30,7 +30,7 @@
  */
 #include "config.h"
 
-#include "igt.h"
+#include "igt_core.h"
 #include <errno.h>
 #include <getopt.h>
 #include <math.h>
diff --git a/tools/meson.build b/tools/meson.build
index 2a084a0c4..6e694164f 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -26,7 +26,6 @@ tools_progs = [
 	'intel_residency',
 	'intel_tiling_detect',
 	'intel_gem_info',
-	'intel_gvtg_test',
 	'dpcd_reg',
 	'lsgpu',
 ]
@@ -132,6 +131,11 @@ executable('intel_display_poller', 'intel_display_poller.c',
 	   install_rpath : bindir_rpathdir,
 	   install : true)
 
+executable('intel_gvtg_test', 'intel_gvtg_test.c',
+	   dependencies : [lib_igt_tools_stub, pciaccess, libdrm, math],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 30/31] lib/igt_core: move igt_load_igtrc to igt_device_scan
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (28 preceding siblings ...)
  2026-07-03 14:29 ` [PATCH i-g-t v2 29/31] tools/intel_gvtg_test: " Sebastian Brzezinka
@ 2026-07-03 14:29 ` 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
                   ` (2 subsequent siblings)
  32 siblings, 1 reply; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:29 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

igt_load_igtrc() is used exclusively by igt_device_scan internals to read
per-device configuration from the igtrc file.  Moving it from igt_core.c
to igt_device_scan.c co-locates the function with its primary user and
makes it possible for lsgpu to link against lib_igt_device_scan without
needing the rest of libigt.

Update the declaration accordingly: remove from igt_core.h and add to
igt_device_scan.h where the implementation now lives.

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/igt_core.c        | 47 ------------------------------------------
 lib/igt_core.h        |  2 --
 lib/igt_device_scan.c | 48 +++++++++++++++++++++++++++++++++++++++++++
 lib/igt_device_scan.h |  2 ++
 4 files changed, 50 insertions(+), 49 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index a7c097d9e..2f737b01a 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -972,53 +972,6 @@ static void oom_adjust_for_doom(void)
 
 }
 
-/**
- * load_igtrc:
- *
- * Load .igtrc from the path pointed to by #IGT_CONFIG_PATH or from
- * home directory if that is not set. The returned keyfile needs to be
- * deallocated using g_key_file_free().
- *
- * Returns: Pointer to the keyfile, NULL on error.
- */
-GKeyFile *igt_load_igtrc(void)
-{
-	char *key_file_env = NULL;
-	char *key_file_loc = NULL;
-	GError *error = NULL;
-	GKeyFile *file;
-	int ret;
-
-	/* Determine igt config path */
-	key_file_env = getenv("IGT_CONFIG_PATH");
-	if (key_file_env) {
-		key_file_loc = key_file_env;
-	} else {
-		key_file_loc = malloc(100);
-		snprintf(key_file_loc, 100, "%s/.igtrc", g_get_home_dir());
-	}
-
-	/* Load igt config file */
-	file = g_key_file_new();
-	ret = g_key_file_load_from_file(file, key_file_loc,
-					G_KEY_FILE_NONE, &error);
-	if (!ret) {
-		g_error_free(error);
-		g_key_file_free(file);
-		file = NULL;
-
-		goto out;
-	}
-
-	g_clear_error(&error);
-
- out:
-	if (!key_file_env && key_file_loc)
-		free(key_file_loc);
-
-	return file;
-}
-
 static void common_init_config(void)
 {
 	GError *error = NULL;
diff --git a/lib/igt_core.h b/lib/igt_core.h
index 3337293bc..afaf35aa8 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -95,8 +95,6 @@ extern const char* __igt_test_description __attribute__((weak));
 extern bool __igt_plain_output;
 extern char *igt_frame_dump_path;
 
-struct _GKeyFile *igt_load_igtrc(void);
-
 /**
  * IGT_TEST_DESCRIPTION:
  * @str: description string
diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
index 7c7995224..a15a4624e 100644
--- a/lib/igt_device_scan.c
+++ b/lib/igt_device_scan.c
@@ -33,6 +33,7 @@
 #include <ctype.h>
 #include <dirent.h>
 #include <fcntl.h>
+#include <glib.h>
 #include <libudev.h>
 #ifdef __linux__
 #include <linux/limits.h>
@@ -2477,3 +2478,50 @@ int igt_device_prepare_filtered_view(const char *vendor)
 
 	return gpu_count;
 }
+
+/**
+ * igt_load_igtrc:
+ *
+ * Load .igtrc from the path pointed to by #IGT_CONFIG_PATH or from
+ * home directory if that is not set. The returned keyfile needs to be
+ * deallocated using g_key_file_free().
+ *
+ * Returns: Pointer to the keyfile, NULL on error.
+ */
+GKeyFile *igt_load_igtrc(void)
+{
+	char *key_file_env = NULL;
+	char *key_file_loc = NULL;
+	GError *error = NULL;
+	GKeyFile *file;
+	int ret;
+
+	/* Determine igt config path */
+	key_file_env = getenv("IGT_CONFIG_PATH");
+	if (key_file_env) {
+		key_file_loc = key_file_env;
+	} else {
+		key_file_loc = malloc(100);
+		snprintf(key_file_loc, 100, "%s/.igtrc", g_get_home_dir());
+	}
+
+	/* Load igt config file */
+	file = g_key_file_new();
+	ret = g_key_file_load_from_file(file, key_file_loc,
+					G_KEY_FILE_NONE, &error);
+	if (!ret) {
+		g_error_free(error);
+		g_key_file_free(file);
+		file = NULL;
+
+		goto out;
+	}
+
+	g_clear_error(&error);
+
+ out:
+	if (!key_file_env && key_file_loc)
+		free(key_file_loc);
+
+	return file;
+}
diff --git a/lib/igt_device_scan.h b/lib/igt_device_scan.h
index f24a193cd..5b04033e3 100644
--- a/lib/igt_device_scan.h
+++ b/lib/igt_device_scan.h
@@ -103,4 +103,6 @@ int igt_open_render(struct igt_device_card *card);
 /* Add or use filters to match multiGPU devices */
 int igt_device_prepare_filtered_view(const char *vendor);
 
+struct _GKeyFile *igt_load_igtrc(void);
+
 #endif /* __IGT_DEVICE_SCAN_H__ */
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH i-g-t v2 31/31] tools/lsgpu: link with minimal sub-libraries
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (29 preceding siblings ...)
  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 14:29 ` 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-03 21:27 ` Krzysztof Niemiec
  32 siblings, 2 replies; 70+ messages in thread
From: Sebastian Brzezinka @ 2026-07-03 14:29 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	krzysztof.niemiec, Ashutosh Dixit

lsgpu only needs device enumeration and the lightweight tool stubs.
Replace #include "igt.h" with the minimal header set and stop linking
against libigt.so.

ldd before: 35  (ldd | wc -l)
ldd after:   8  (ldd | wc -l)

Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tools/lsgpu.c     | 2 +-
 tools/meson.build | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/lsgpu.c b/tools/lsgpu.c
index 935371dea..7d6b70b9b 100644
--- a/tools/lsgpu.c
+++ b/tools/lsgpu.c
@@ -34,7 +34,7 @@
 #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 6e694164f..fbc6c0a00 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -27,7 +27,6 @@ tools_progs = [
 	'intel_tiling_detect',
 	'intel_gem_info',
 	'dpcd_reg',
-	'lsgpu',
 ]
 tool_deps = igt_deps
 tool_deps += zlib
@@ -172,6 +171,12 @@ install_data(['intel_gpu_abrt', 'intel-gfx-fw-info'], install_dir : bindir)
 
 install_subdir('registers', install_dir : datadir)
 
+executable('lsgpu', 'lsgpu.c',
+	   dependencies : [lib_igt_device_scan, lib_igt_tools_stub,
+	                    lib_igt_drm_stub, glib, libudev, libpci],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 executable('intel_gpu_top', 'intel_gpu_top.c',
 	   install : true,
 	   install_rpath : bindir_rpathdir,
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 01/31] lib/igt_tools_stub: introduce static sub-library for tools
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 19:21 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:35 GMT, Sebastian Brzezinka wrote:
> Add lib_igt_tools_stub built from igt_tools_stub.c. Tools that need
> minimal IGT assert/logging stubs can link this without pulling in the
> full libigt.so stack.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/meson.build | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/lib/meson.build b/lib/meson.build
> index d1289a5e0..e95b29d49 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -349,6 +349,13 @@ lib_igt_perf_build = static_library('igt_perf',
>  lib_igt_perf = declare_dependency(link_with : lib_igt_perf_build,
>  				  include_directories : inc)
>  
> +lib_igt_tools_stub_build = static_library('igt_tools_stub',
> +	['igt_tools_stub.c'],
> +	include_directories : inc)
> +
> +lib_igt_tools_stub = declare_dependency(link_with : lib_igt_tools_stub_build,
> +					include_directories : inc)
> +
>  scan_dep = [
>  	glib,
>  	libpci,
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 02/31] lib/igt_stats: introduce static sub-library for tools
  2026-07-03 14:28 ` [PATCH i-g-t v2 02/31] lib/igt_stats: " Sebastian Brzezinka
@ 2026-07-03 19:22   ` Krzysztof Niemiec
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 19:22 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:36 GMT, Sebastian Brzezinka wrote:
> Add lib_igt_stats built from igt_stats.c. Tools that need the
> statistics helpers can link this without pulling in the full
> libigt.so stack.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/meson.build | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/lib/meson.build b/lib/meson.build
> index e95b29d49..a57c1eb8d 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -397,6 +397,13 @@ lib_igt_profiling_build = static_library('igt_profiling',
>  lib_igt_profiling = declare_dependency(link_with : lib_igt_profiling_build,
>  				        include_directories : inc)
>  
> +lib_igt_stats_build = static_library('igt_stats_tools',
> +	['igt_stats.c'],
> +	include_directories : inc)
> +
> +lib_igt_stats = declare_dependency(link_with : lib_igt_stats_build,
> +				   include_directories : inc)
> +
>  i915_perf_files = [
>    'igt_list.c',
>    'i915/perf.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 03/31] tools/igt_stats: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 19:23 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:37 GMT, Sebastian Brzezinka wrote:
> igt_stats only needs the statistics helpers and a small assert stub.
> Link it against lib_igt_stats and lib_igt_tools_stub instead of the
> full libigt.so stack.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   4  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 8185ba160..286a718c8 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -14,7 +14,6 @@ endforeach
>  tools_progs = [
>  	'igt_facts',
>  	'igt_power',
> -	'igt_stats',
>  	'intel_audio_dump',
>  	'intel_backlight',
>  	'intel_bios_dumper',
> @@ -58,6 +57,11 @@ foreach prog : tools_progs
>  		   install : true)
>  endforeach
>  
> +executable('igt_stats', 'igt_stats.c',
> +	   dependencies : [lib_igt_stats, lib_igt_tools_stub, math],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 04/31] tools/intel_firmware_decode: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 19:24 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:38 GMT, Sebastian Brzezinka wrote:
> intel_firmware_decode only needs the lightweight assert stub used by
> igt_assert(), so the full libigt.so stack is unnecessary.
> 
> Switch to linking against lib_igt_tools_stub only.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   3   (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 286a718c8..4c67dde4f 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -24,7 +24,6 @@ tools_progs = [
>  	'intel_error_decode',
>  	'intel_forcewaked',
>  	'intel_gpu_frequency',
> -	'intel_firmware_decode',
>  	'intel_framebuffer_dump',
>  	'intel_gpu_time',
>  	'intel_gtt',
> @@ -62,6 +61,11 @@ executable('igt_stats', 'igt_stats.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_firmware_decode', 'intel_firmware_decode.c',
> +	   dependencies : [lib_igt_tools_stub],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 05/31] lib/igt_tools_stub: add stubs needed by tools
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 19:40 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:39 GMT, Sebastian Brzezinka wrote:
> Add stubs for functions used by tools when linking without the
> full libigt.so: __igt_skip_check, igt_exit, igt_debugfs_open and
> igt_open_forcewake_handle_for_pcidev.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/igt_tools_stub.c | 77 ++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 70 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/igt_tools_stub.c b/lib/igt_tools_stub.c
> index 9a0ec6217..71c850e2f 100644
> --- a/lib/igt_tools_stub.c
> +++ b/lib/igt_tools_stub.c
> @@ -21,12 +21,26 @@
>   * IN THE SOFTWARE.
>   *
>   */
> +#include <fcntl.h>
> +#include <limits.h>
> +#include <stdarg.h>
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <sys/stat.h>
> +#include <sys/sysmacros.h>
> +#include <unistd.h>
> +
>  #include "igt_core.h"
> +#include "igt_debugfs.h"
>  
> -/* Stub for igt_log, this stub will simply print the msg on stderr device.
> - * Domain and log level are ignored.
> +/*
> + * Forward declaration only - avoids pulling in the heavy igt_gt.h header.
> + * The type is used as an opaque pointer; this stub always returns -1.
>   */
> +struct pci_device;
> +int igt_open_forcewake_handle_for_pcidev(const struct pci_device *pci_dev);
>  
> +/* Stub for igt_log: print message to stderr; domain and log level are ignored. */
>  void igt_log(const char *domain, enum igt_log_level level, const char *format, ...)
>  {
>  	va_list args;
> @@ -36,11 +50,7 @@ void igt_log(const char *domain, enum igt_log_level level, const char *format, .
>  	va_end(args);
>  }
>  
> -
> -/* Stub for __igt_fail_assert, this stub will simply print the msg on stderr device and
> - * exit the application, domain and log level are ignored.
> - */
> -
> +/* Stub for __igt_fail_assert: print failed assertion to stderr and exit. */
>  void __igt_fail_assert(const char *domain, const char *file,
>  		       const int line, const char *func, const char *assertion,
>  		       const char *format, ...)
> @@ -49,3 +59,56 @@ void __igt_fail_assert(const char *domain, const char *file,
>  		func, assertion);
>  	exit(1);
>  }
> +
> +/* Stub for __igt_skip_check: print skip reason to stderr and exit with skip code. */
> +void __igt_skip_check(const char *file, const int line,
> +		      const char *func, const char *check, const char *format, ...)
> +{
> +	fprintf(stderr, "%s: %d %s Skipped: %s", file, line, func, check);
> +	if (format) {
> +		va_list args;
> +
> +		fprintf(stderr, ": ");
> +		va_start(args, format);
> +		vfprintf(stderr, format, args);
> +		va_end(args);
> +	}
> +	fprintf(stderr, "\n");
> +	exit(77);
> +}

What is error 77 here? If you can't avoid the magic number at least
leave a comment.

Also, the style in the codebase seems to be to leave an empty line
directly after a block (so here it should be between the if closing curly
brace and the fprintf), but this is a bit of a nit.

> +
> +/* Stub for igt_exit: tools use exit(0) rather than the full igt teardown sequence. */
> +__noreturn void igt_exit(void)
> +{
> +	exit(0);
> +}
> +
> +/* Stub for igt_debugfs_open: open a debugfs entry for a DRM device directly by path.
> + * device == -1 follows the igt_debugfs_path() convention of defaulting to
> + * the first DRM device (dri/0).  When a valid fd is given, the DRM minor is
> + * resolved via fstat() so the correct dri/<minor> directory is used.
> + */

Unify multiline comments: before in the patch you're using

/*
 * comment
 * bla bla
 */

 here it's

 /* comment 2
  * bla bla
  */

The rest of the codebase mostly uses the first variant, so I imagine
it's better to use that; either way it should be made the same.

> +int igt_debugfs_open(int device, const char *filename, int mode)
> +{
> +	char path[PATH_MAX];
> +	int drm_minor = 0;
> +
> +	if (device >= 0) {
> +		struct stat st;
> +
> +		if (fstat(device, &st) == 0 && S_ISCHR(st.st_mode))
> +			drm_minor = minor(st.st_rdev);
> +	}
> +
> +	snprintf(path, sizeof(path),
> +		 "/sys/kernel/debug/dri/%d/%s", drm_minor, filename);
> +	return open(path, mode);
> +}
> +
> +/* Stub for igt_open_forcewake_handle_for_pcidev: in tool context the driver
> + * keeps the GPU awake; no forcewake handle needed.
> + */

Same issue with the comment as above.

Thanks
Krzysztof

> +int igt_open_forcewake_handle_for_pcidev(const struct pci_device *pci_dev)
> +{
> +	return -1;
> +}
> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 06/31] lib/igt_drm_stub: introduce for tools needing driver detection
  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
  1 sibling, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 20:31 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:40 GMT, Sebastian Brzezinka wrote:
> Add drm/pciaccess-dependent stubs into a new igt_drm_stub.c.  This avoids
> pulling libdrm into tools that only need dep-free logging and exit stubs.
> 
> The new lib_igt_drm_stub static sub-library provides: igt_pci_system_init,
> is_i915_device, is_intel_device, xe_dev_id and __drm_open_driver.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/igt_drm_stub.c | 132 +++++++++++++++++++++++++++++++++++++++++++++
>  lib/meson.build    |   9 ++++
>  2 files changed, 141 insertions(+)
>  create mode 100644 lib/igt_drm_stub.c
> 
> diff --git a/lib/igt_drm_stub.c b/lib/igt_drm_stub.c
> new file mode 100644
> index 000000000..f8ac3a992
> --- /dev/null
> +++ b/lib/igt_drm_stub.c
> @@ -0,0 +1,132 @@
> +/*
> + * Copyright © 2026 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + */
> +
> +/*
> + * Minimal DRM/PCI stubs for tools that need driver detection and device
> + * opening but do not link the full libigt.so.  Requires libdrm and pciaccess.
> + */
> +
> +#include <errno.h>
> +#include <fcntl.h>
> +#include <limits.h>
> +#include <pciaccess.h>
> +#include <stdbool.h>
> +#include <stdint.h>
> +#include <stdio.h>
> +#include <string.h>
> +#include <sys/stat.h>
> +#include <sys/sysmacros.h>
> +#include <unistd.h>
> +#include <xf86drm.h>
> +
> +#include "drmtest.h"
> +
> +int igt_pci_system_init(void)
> +{
> +	return pci_system_init();
> +}
> +
> +static bool driver_name_matches(int fd, const char *name)
> +{
> +	drmVersionPtr version;
> +	bool match = false;
> +
> +	version = drmGetVersion(fd);
> +	if (!version)
> +		return false;
> +
> +	match = version->name_len > 0 && !strcmp(version->name, name);
> +	drmFreeVersion(version);
> +
> +	return match;
> +}
> +
> +bool is_i915_device(int fd)
> +{
> +	return driver_name_matches(fd, "i915");
> +}
> +
> +bool is_intel_device(int fd)
> +{
> +	return is_i915_device(fd) || driver_name_matches(fd, "xe");
> +}
> +
> +static uint16_t read_pci_device_id(int fd)
> +{
> +	char path[PATH_MAX], buf[32];
> +	struct stat st;
> +	int sysfs, len;
> +	unsigned int devid;
> +
> +	if (fstat(fd, &st) || !S_ISCHR(st.st_mode))
> +		return 0;
> +
> +	snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/device",
> +		 major(st.st_rdev), minor(st.st_rdev));
> +	sysfs = open(path, O_RDONLY);
> +	if (sysfs < 0)
> +		return 0;
> +
> +	len = read(sysfs, buf, sizeof(buf) - 1);
> +	close(sysfs);
> +	if (len <= 0)
> +		return 0;
> +
> +	buf[len] = '\0';
> +	if (sscanf(buf, "0x%x", &devid) != 1)
> +		return 0;
> +
> +	return devid;
> +}
> +
> +/* Matches the declaration in lib/xe/xe_query.h declared here to satisfy
> + * -Wmissing-prototypes without pulling in the heavy xe_query.h header.
> + */

Same thing with comments as in the previous patch; I'll omit pointing
out any other places in the rest of the series - but just for the sake
of brevity, the comments should be unified everywhere.

> +uint16_t xe_dev_id(int fd);
> +uint16_t xe_dev_id(int fd)
> +{
> +	return read_pci_device_id(fd);
> +}
> +

Why can't the users of this function just use read_pci_device_id()
directly? It's not i915-specific. The function declaration looks very hacky.
But I guess it's kind of unavoidable if you don't want a separate .h file.
Ack from me on this if there's not a cleaner way to do this.

> +int __drm_open_driver(int chipset)
> +{
> +	char path[PATH_MAX];
> +	int fd;
> +
> +	for (int i = 0; i < 16; i++) {
> +		snprintf(path, sizeof(path), "/dev/dri/card%d", i);
> +		fd = open(path, O_RDWR | O_CLOEXEC);
> +		if (fd < 0)
> +			continue;
> +
> +		if ((chipset == DRIVER_INTEL && is_i915_device(fd)) ||
> +		    (chipset == DRIVER_XE && driver_name_matches(fd, "xe")) ||
> +		    (chipset == DRIVER_ANY && is_intel_device(fd)))
> +			return fd;
> +
> +		close(fd);
> +	}
> +
> +	errno = ENODEV;
> +	return -1;
> +}
> diff --git a/lib/meson.build b/lib/meson.build
> index a57c1eb8d..484a912d7 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -356,6 +356,15 @@ lib_igt_tools_stub_build = static_library('igt_tools_stub',
>  lib_igt_tools_stub = declare_dependency(link_with : lib_igt_tools_stub_build,
>  					include_directories : inc)
>  
> +lib_igt_drm_stub_build = static_library('igt_drm_stub',
> +	['igt_drm_stub.c'],
> +	dependencies : [libdrm, pciaccess],
> +	include_directories : inc)
> +
> +lib_igt_drm_stub = declare_dependency(link_with : lib_igt_drm_stub_build,
> +				      dependencies : [libdrm, pciaccess],
> +				      include_directories : inc)
> +
>  scan_dep = [
>  	glib,
>  	libpci,
> -- 

With the comments fixed:

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (30 preceding siblings ...)
  2026-07-03 14:29 ` [PATCH i-g-t v2 31/31] tools/lsgpu: link with minimal sub-libraries Sebastian Brzezinka
@ 2026-07-03 20:55 ` Krzysztof Niemiec
  2026-07-06  8:37   ` Krzysztof Karas
  2026-07-03 21:27 ` Krzysztof Niemiec
  32 siblings, 1 reply; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 20:55 UTC (permalink / raw)
  To: Sebastian Brzezinka; +Cc: igt-dev, kamil.konieczny, krzysztof.karas

Hi Sebastian,

On 2026-07-03 at 16:28:34 GMT, Sebastian Brzezinka wrote:
> 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).
> 

I'm halfway through reading your series, and I can't help but think that
this series is only remedying the real problem of building almost
everything in the lib/ folder as one big shared library. We're putting
literally everything in libigt.so, even though at the source level
everything is split nicely into .c and .h files. Correct me if I'm
understanding the build system wrong but it looks like we're already
even building static libraries for all the little files in lib/, and
linking them into libigt.so at the end.

I guess at this point this is a matter of a tradeoff, because all tests
depend on libigt.so; after splitting its contents into smaller shared
objects it would be almost a herculean task to isolate the correct
dependencies in all the tests. If it was done from the start it would be
very much feasible, because tests and its build files would be written
with that in mind, but you know, benefit of hindsight.

And then if the core libs would have been split more properly, this
series wouldn't be really needed - the tools would just include and link
what they need.

So this series is solving the problem very pragmatically in my opinion,
to my mind it should absolutely go in. However, I think we should assess
whether it's worth leaving at least a "TODO: modularize libigt.so"
somewhere, so it could be addressed at some point in the future.

Thanks
Krzysztof

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 07/31] lib/igt_device_scan: wire to use static sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 20:56 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:41 GMT, Sebastian Brzezinka wrote:
> Drop the directly compiled igt_tools_stub.c from lib_igt_device_scan
> and link lib_igt_tools_stub and lib_igt_drm_stub instead. Compiling
> igt_tools_stub.c directly would cause duplicate symbol errors when a
> tool links both lib_igt_device_scan and lib_igt_tools_stub.
> 
> Add libdrm and pciaccess to scan_dep so tools linking lib_igt_device_scan
> pick up the right dependencies.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/meson.build | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/meson.build b/lib/meson.build
> index 484a912d7..2c1fbcd43 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -367,22 +367,24 @@ lib_igt_drm_stub = declare_dependency(link_with : lib_igt_drm_stub_build,
>  
>  scan_dep = [
>  	glib,
> +	libdrm,
>  	libpci,
>  	libudev,
> +	pciaccess,
>  ]
>  
>  lib_igt_device_scan_build = static_library('igt_device_scan',
>  	['igt_device_scan.c',
>  	'igt_list.c',
>  	'igt_map.c',
> -	'igt_tools_stub.c',
>  	'intel_device_info.c',
>  	'intel_cmds_info.c',
>  	],
> -	dependencies : scan_dep,
> +	dependencies : [scan_dep, lib_igt_drm_stub, lib_igt_tools_stub],
>  	include_directories : inc)
>  
>  lib_igt_device_scan = declare_dependency(link_with : lib_igt_device_scan_build,
> +				  dependencies : [libdrm, pciaccess],
>  				  include_directories : inc)
>  
>  lib_igt_drm_clients_build = static_library('igt_drm_clients',

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 08/31] tools/intel_gpu_top: add explicit drm/tools-stub deps
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 20:57 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:42 GMT, Sebastian Brzezinka wrote:
> Meson does not automatically propagate static library dependencies
> to executables via link_with.  lib_igt_device_scan internally links
> lib_igt_drm_stub and lib_igt_tools_stub but does not reexport them
> through its declare_dependency.  As a result intel_gpu_top must list
> them explicitly, otherwise the linker cannot resolve symbols such as
> is_i915_device and igt_log at final link time.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 4c67dde4f..53aa31056 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -105,7 +105,8 @@ 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])
> +	   dependencies : [lib_igt_perf,lib_igt_device_scan,lib_igt_drm_clients,lib_igt_drm_fdinfo,
> +	                   lib_igt_drm_stub, lib_igt_tools_stub, math])
>  
>  executable('amd_hdmi_compliance', 'amd_hdmi_compliance.c',
>  	   dependencies : [tool_deps],
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 09/31] lib/igt_halffloat: introduce static sub-library for tools
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 20:58 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:43 GMT, Sebastian Brzezinka wrote:
> Add lib_igt_halffloat backed by igt_halffloat.c with a math dependency.
> Tools that use half-float conversion (e.g. intel_vbt_decode) can link
> this minimal library instead of the full libigt.so.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/meson.build | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/lib/meson.build b/lib/meson.build
> index 2c1fbcd43..93db217f8 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -415,6 +415,14 @@ lib_igt_stats_build = static_library('igt_stats_tools',
>  lib_igt_stats = declare_dependency(link_with : lib_igt_stats_build,
>  				   include_directories : inc)
>  
> +lib_igt_halffloat_build = static_library('igt_halffloat',
> +	['igt_halffloat.c'],
> +	include_directories : inc)
> +
> +lib_igt_halffloat = declare_dependency(link_with : lib_igt_halffloat_build,
> +				       dependencies : [math],
> +				       include_directories : inc)
> +
>  i915_perf_files = [
>    'igt_list.c',
>    'i915/perf.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 10/31] lib/i915/intel_decode: introduce static sub-library for tools
  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
  1 sibling, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 20:58 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:44 GMT, Sebastian Brzezinka wrote:
> Add lib_i915_decode built from i915/intel_decode.c and instdone.c.
> This lets tools like intel_error_decode link only the decode logic
> without pulling in the full libigt.so.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/meson.build | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/lib/meson.build b/lib/meson.build
> index 93db217f8..ba4ece3a2 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -423,6 +423,18 @@ lib_igt_halffloat = declare_dependency(link_with : lib_igt_halffloat_build,
>  				       dependencies : [math],
>  				       include_directories : inc)
>  
> +lib_i915_decode_build = static_library('i915_decode',
> +	['i915/intel_decode.c',
> +	 'instdone.c',
> +	],
> +	dependencies : [lib_igt_chipset],
> +	include_directories : inc)
> +
> +lib_i915_decode = declare_dependency(link_with : lib_i915_decode_build,
> +				     dependencies : [lib_igt_chipset,
> +				                     lib_igt_tools_stub],
> +				     include_directories : inc)
> +
>  i915_perf_files = [
>    'igt_list.c',
>    'i915/perf.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 11/31] lib/intel_mmio: introduce lib_igt_reg_tools static sub-library for tools
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 20:59 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:45 GMT, Sebastian Brzezinka wrote:
> Add lib_igt_reg_tools built from intel_mmio.c, intel_reg_map.c and
> intel_iosf.c.  Tools that need register access (e.g. intel_reg) can link
> this library without pulling in the full libigt.so.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/meson.build | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/lib/meson.build b/lib/meson.build
> index ba4ece3a2..43ae4ce66 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -435,6 +435,21 @@ lib_i915_decode = declare_dependency(link_with : lib_i915_decode_build,
>  				                     lib_igt_tools_stub],
>  				     include_directories : inc)
>  
> +lib_igt_reg_tools_build = static_library('igt_reg_tools',
> +	['intel_mmio.c',
> +	 'intel_reg_map.c',
> +	 'intel_iosf.c',
> +	],
> +	dependencies : [pciaccess, libdrm],
> +	include_directories : inc)
> +
> +lib_igt_reg_tools = declare_dependency(link_with : lib_igt_reg_tools_build,
> +				       dependencies : [lib_igt_chipset,
> +				                       lib_igt_tools_stub,
> +				                       lib_igt_drm_stub,
> +				                       pciaccess, libdrm],
> +				       include_directories : inc)
> +
>  i915_perf_files = [
>    'igt_list.c',
>    'i915/perf.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 12/31] tools/intel_gpu_frequency: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:00 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:46 GMT, Sebastian Brzezinka wrote:
> intel_gpu_frequency needs only intel_gen/devid helpers and a DRM device
> opener to query the GPU frequency.  Link it against lib_igt_chipset for
> the devid helpers and lib_igt_drm_stub for driver detection and device
> opening, instead of the full libigt.so stack.
> 
> ldd before: 35  (ldd intel_gpu_frequency | wc -l)
> ldd after:   5  (ldd intel_gpu_frequency | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 53aa31056..01400f53e 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -23,7 +23,6 @@ tools_progs = [
>  	'intel_dump_decode',
>  	'intel_error_decode',
>  	'intel_forcewaked',
> -	'intel_gpu_frequency',
>  	'intel_framebuffer_dump',
>  	'intel_gpu_time',
>  	'intel_gtt',
> @@ -66,6 +65,11 @@ executable('intel_firmware_decode', 'intel_firmware_decode.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_gpu_frequency', 'intel_gpu_frequency.c',
> +	   dependencies : [lib_igt_chipset, lib_igt_tools_stub, lib_igt_drm_stub],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 13/31] lib/i915/intel_decode: replace igt.h with minimal headers
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:02 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:47 GMT, Sebastian Brzezinka wrote:
> intel_decode.c only uses two symbols from the IGT: intel_gen()
> and intel_get_device_info(), both provided by intel_chipset.h.
> The DRM_PRINTFLIKE macro used for the instr_out() format attribute is
> provided by xf86drm.h.
> 
> This is a prerequisite for building intel_decode.c into a static
> sub-library (lib_i915_decode) that tools can link without pulling in
> the full libigt.so stack.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/i915/intel_decode.c | 4 ++--
>  lib/meson.build         | 4 +++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/i915/intel_decode.c b/lib/i915/intel_decode.c
> index b78993c47..d4a4da4da 100644
> --- a/lib/i915/intel_decode.c
> +++ b/lib/i915/intel_decode.c
> @@ -28,8 +28,8 @@
>  #include <stdbool.h>
>  #include <stdarg.h>
>  #include <string.h>
> -
> -#include "igt.h"
> +#include <xf86drm.h>
> +#include "intel_chipset.h"
>  #include "intel_decode.h"
>  

Nit: shouldn't you use a newline between <> and "" includes?

>  /* Struct for tracking intel_decode state. */
> diff --git a/lib/meson.build b/lib/meson.build
> index 43ae4ce66..aa8eae68b 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -432,7 +432,9 @@ lib_i915_decode_build = static_library('i915_decode',
>  
>  lib_i915_decode = declare_dependency(link_with : lib_i915_decode_build,
>  				     dependencies : [lib_igt_chipset,
> -				                     lib_igt_tools_stub],
> +				                     lib_igt_tools_stub,
> +				                     lib_igt_drm_stub,
> +				                     pciaccess],
>  				     include_directories : inc)
>  
>  lib_igt_reg_tools_build = static_library('igt_reg_tools',
> -- 

With nitpick resolved:

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 14/31] tools/intel_stepping: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:03 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:48 GMT, Sebastian Brzezinka wrote:
> intel_stepping only needs the chipset tables and the small tool stub
> support used by those helpers, not the full libigt.so stack.
> 
> Switch to linking against lib_igt_chipset, lib_igt_tools_stub and
> libpciaccess.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   4  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 01400f53e..8eb346321 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -36,7 +36,6 @@ tools_progs = [
>  	'intel_pm_rpm',
>  	'intel_reg_checker',
>  	'intel_residency',
> -	'intel_stepping',
>  	'intel_tiling_detect',
>  	'intel_vbt_decode',
>  	'intel_watermark',
> @@ -70,6 +69,12 @@ executable('intel_gpu_frequency', 'intel_gpu_frequency.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_stepping', 'intel_stepping.c',
> +	   dependencies : [lib_igt_chipset, lib_igt_tools_stub, lib_igt_drm_stub,
> +	                    pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 15/31] tools/intel_gtt: link with minimal sub-libraries
  2026-07-03 14:28 ` [PATCH i-g-t v2 15/31] tools/intel_gtt: " Sebastian Brzezinka
@ 2026-07-03 21:04   ` Krzysztof Niemiec
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:04 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:49 GMT, Sebastian Brzezinka wrote:
> intel_gtt only needs the chipset helpers plus the small tool stubs they
> rely on. The full libigt.so dependency chain is unnecessary.
> 
> Switch to linking against lib_igt_chipset, lib_igt_tools_stub,
> lib_igt_drm_stub, pciaccess and libdrm.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 8eb346321..a3fef87a9 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -25,7 +25,6 @@ tools_progs = [
>  	'intel_forcewaked',
>  	'intel_framebuffer_dump',
>  	'intel_gpu_time',
> -	'intel_gtt',
>  	'intel_guc_logger',
>  	'intel_hdcp',
>  	'intel_infoframes',
> @@ -75,6 +74,12 @@ executable('intel_stepping', 'intel_stepping.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_gtt', 'intel_gtt.c',
> +	   dependencies : [lib_igt_chipset, lib_igt_tools_stub, lib_igt_drm_stub,
> +	                    pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 16/31] tools/intel_dump_decode: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:04 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:50 GMT, Sebastian Brzezinka wrote:
> intel_dump_decode only needs the i915 decoder. Link it against
> lib_i915_decode instead of the full libigt.so stack.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   4  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index a3fef87a9..467b8eea1 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -20,7 +20,6 @@ tools_progs = [
>  	'intel_display_bandwidth',
>  	'intel_display_crc',
>  	'intel_display_poller',
> -	'intel_dump_decode',
>  	'intel_error_decode',
>  	'intel_forcewaked',
>  	'intel_framebuffer_dump',
> @@ -80,6 +79,11 @@ executable('intel_gtt', 'intel_gtt.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_dump_decode', 'intel_dump_decode.c',
> +	   dependencies : [lib_i915_decode],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 17/31] tools/intel_error_decode: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:04 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:51 GMT, Sebastian Brzezinka wrote:
> intel_error_decode needs the batch decoder, chipset tables and zlib for
> compressed error state handling, but not the full libigt.so stack.
> 
> Switch to linking against lib_i915_decode plus the minimal helper
> libraries it relies on.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   4  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 467b8eea1..b04754c5e 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -20,7 +20,6 @@ tools_progs = [
>  	'intel_display_bandwidth',
>  	'intel_display_crc',
>  	'intel_display_poller',
> -	'intel_error_decode',
>  	'intel_forcewaked',
>  	'intel_framebuffer_dump',
>  	'intel_gpu_time',
> @@ -84,6 +83,11 @@ executable('intel_dump_decode', 'intel_dump_decode.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_error_decode', 'intel_error_decode.c',
> +	   dependencies : [lib_i915_decode, pciaccess, zlib, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 18/31] tools/intel_vbt_decode: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:04 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:52 GMT, Sebastian Brzezinka wrote:
> intel_vbt_decode only needs the chipset tables, half-float conversion
> helpers and the lightweight tool stubs used by those helpers.
> 
> Switch to linking against lib_igt_chipset, lib_igt_halffloat and
> lib_igt_tools_stub instead of the full libigt.so stack.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   4  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index b04754c5e..46cf1a717 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -34,7 +34,6 @@ tools_progs = [
>  	'intel_reg_checker',
>  	'intel_residency',
>  	'intel_tiling_detect',
> -	'intel_vbt_decode',
>  	'intel_watermark',
>  	'intel_gem_info',
>  	'intel_gvtg_test',
> @@ -88,6 +87,11 @@ executable('intel_error_decode', 'intel_error_decode.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_vbt_decode', 'intel_vbt_decode.c',
> +	   dependencies : [lib_igt_chipset, lib_igt_halffloat, lib_igt_tools_stub, pciaccess, libdrm, math],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 19/31] tools/intel_backlight: link with minimal sub-libraries
  2026-07-03 14:28 ` [PATCH i-g-t v2 19/31] tools/intel_backlight: " Sebastian Brzezinka
@ 2026-07-03 21:05   ` Krzysztof Niemiec
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:05 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:53 GMT, Sebastian Brzezinka wrote:
> intel_backlight only needs MMIO/register access helpers and the chipset
> metadata they use. The full libigt.so stack is unnecessary.
> 
> Add lib_igt_reg_tools and link intel_backlight against it instead of
> libigt.so.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 46cf1a717..8899a5b49 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -15,7 +15,6 @@ tools_progs = [
>  	'igt_facts',
>  	'igt_power',
>  	'intel_audio_dump',
> -	'intel_backlight',
>  	'intel_bios_dumper',
>  	'intel_display_bandwidth',
>  	'intel_display_crc',
> @@ -92,6 +91,11 @@ executable('intel_vbt_decode', 'intel_vbt_decode.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_backlight', 'intel_backlight.c',
> +	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 20/31] tools/intel_lid: link with minimal sub-libraries
  2026-07-03 14:28 ` [PATCH i-g-t v2 20/31] tools/intel_lid: " Sebastian Brzezinka
@ 2026-07-03 21:05   ` Krzysztof Niemiec
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:05 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:54 GMT, Sebastian Brzezinka wrote:
> intel_lid only needs the register/MMIO helper subset, not the full
> libigt.so stack.
> 
> Switch to linking against lib_igt_reg_tools.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 8899a5b49..0978f8f11 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -25,7 +25,6 @@ tools_progs = [
>  	'intel_guc_logger',
>  	'intel_hdcp',
>  	'intel_infoframes',
> -	'intel_lid',
>  	'intel_opregion_decode',
>  	'intel_panel_fitter',
>  	'intel_perf_counters',
> @@ -96,6 +95,11 @@ executable('intel_backlight', 'intel_backlight.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_lid', 'intel_lid.c',
> +	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 21/31] tools/intel_gpu_time: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:06 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:55 GMT, Sebastian Brzezinka wrote:
> intel_gpu_time only needs the register/MMIO helper subset, not the full
> libigt.so stack.
> 
> Switch to linking against lib_igt_reg_tools.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5   (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 0978f8f11..2e8ceea36 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -21,7 +21,6 @@ tools_progs = [
>  	'intel_display_poller',
>  	'intel_forcewaked',
>  	'intel_framebuffer_dump',
> -	'intel_gpu_time',
>  	'intel_guc_logger',
>  	'intel_hdcp',
>  	'intel_infoframes',
> @@ -100,6 +99,11 @@ executable('intel_lid', 'intel_lid.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_gpu_time', 'intel_gpu_time.c',
> +	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 22/31] tools/intel_audio_dump: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:06 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:56 GMT, Sebastian Brzezinka wrote:
> intel_audio_dump only needs the register/MMIO helper subset, not the
> full libigt.so stack.
> 
> Switch to linking against lib_igt_reg_tools.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 2e8ceea36..f9bbb41a9 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -14,7 +14,6 @@ endforeach
>  tools_progs = [
>  	'igt_facts',
>  	'igt_power',
> -	'intel_audio_dump',
>  	'intel_bios_dumper',
>  	'intel_display_bandwidth',
>  	'intel_display_crc',
> @@ -104,6 +103,11 @@ executable('intel_gpu_time', 'intel_gpu_time.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_audio_dump', 'intel_audio_dump.c',
> +	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 23/31] tools/intel_forcewaked: link with minimal sub-libraries
  2026-07-03 14:28 ` [PATCH i-g-t v2 23/31] tools/intel_forcewaked: " Sebastian Brzezinka
@ 2026-07-03 21:06   ` Krzysztof Niemiec
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:06 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:57 GMT, Sebastian Brzezinka wrote:
> intel_forcewaked only needs the register/MMIO helper subset, not the
> full libigt.so stack.
> 
> Switch to linking against lib_igt_reg_tools.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index f9bbb41a9..15bd40dec 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -18,7 +18,6 @@ tools_progs = [
>  	'intel_display_bandwidth',
>  	'intel_display_crc',
>  	'intel_display_poller',
> -	'intel_forcewaked',
>  	'intel_framebuffer_dump',
>  	'intel_guc_logger',
>  	'intel_hdcp',
> @@ -108,6 +107,11 @@ executable('intel_audio_dump', 'intel_audio_dump.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_forcewaked', 'intel_forcewaked.c',
> +	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 24/31] tools/intel_guc_logger: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:08 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:58 GMT, Sebastian Brzezinka wrote:
> intel_guc_logger only needs core logging/assert helpers and debugfs
> access, not the full libigt.so stack. Replace the monolithic include
> with the minimal headers and link against lib_igt_tools_stub.
> 
> The tool previously used igt_simple_main_args() for option parsing, which
> is part of libigt.so and cannot be used without it. Replace it with a
> direct getopt_long() loop. As part of this: add a 'help' long option, a
> usage string header, and a default case that calls exit(1) on unrecognised
> options, behaviour that igt_simple_main_args() provided implicitly.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   3  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/intel_guc_logger.c | 21 ++++++++++++++++++---
>  tools/meson.build        |  6 +++++-
>  2 files changed, 23 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/intel_guc_logger.c b/tools/intel_guc_logger.c
> index 629b4e660..3990aef87 100644
> --- a/tools/intel_guc_logger.c
> +++ b/tools/intel_guc_logger.c
> @@ -38,9 +38,12 @@
>  #include <sys/syscall.h>
>  #include <sys/mman.h>
>  #include <assert.h>
> +#include <getopt.h>
>  #include <pthread.h>
>  
> -#include "igt.h"
> +#include "drmtest.h"
> +#include "igt_core.h"
> +#include "igt_debugfs.h"
>  
>  #define MB(x) ((uint64_t)(x) * 1024 * 1024)
>  #ifndef PAGE_SIZE
> @@ -367,6 +370,8 @@ static int parse_options(int opt, int opt_index, void *data)
>  		discard_oldlogs = true;
>  		igt_debug("old/boot-time logs will be discarded\n");
>  		break;
> +	default:
> +		exit(1);
>  	}
>  
>  	return 0;
> @@ -382,10 +387,12 @@ static void process_command_line(int argc, char **argv)
>  		{"polltimeout", required_argument, 0, 'p'},
>  		{"size", required_argument, 0, 's'},
>  		{"discard", no_argument, 0, 'd'},
> +		{"help", no_argument, 0, 'h'},
>  		{ 0, 0, 0, 0 }
>  	};
>  
>  	const char *help =
> +		"Usage: intel_guc_logger [options]\n"
>  		"  -v --verbosity=level   verbosity level of GuC logging (0-3)\n"
>  		"  -o --outputfile=name   name of the output file, including the location, where logs will be stored\n"
>  		"  -b --buffers=num       number of buffers to be maintained on logger side for storing logs\n"
> @@ -394,8 +401,16 @@ static void process_command_line(int argc, char **argv)
>  		"  -s --size=MB           max size of output file in MBs after which logging will be stopped\n"
>  		"  -d --discard           discard the old/boot-time logs before entering into the capture loop\n";
>  
> -	igt_simple_init_parse_opts(&argc, argv, "v:o:b:t:p:s:d", long_options,
> -				   help, parse_options, NULL);
> +	int opt, opt_index = 0;
> +
> +	while ((opt = getopt_long(argc, argv, "v:o:b:t:p:s:dh",
> +				  long_options, &opt_index)) != -1) {
> +		if (opt == 'h') {
> +			printf("%s", help);
> +			exit(0);
> +		}
> +		parse_options(opt, opt_index, NULL);
> +	}
>  }
>  
>  int main(int argc, char **argv)
> diff --git a/tools/meson.build b/tools/meson.build
> index 15bd40dec..32a345e9d 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -19,7 +19,6 @@ tools_progs = [
>  	'intel_display_crc',
>  	'intel_display_poller',
>  	'intel_framebuffer_dump',
> -	'intel_guc_logger',
>  	'intel_hdcp',
>  	'intel_infoframes',
>  	'intel_opregion_decode',
> @@ -112,6 +111,11 @@ executable('intel_forcewaked', 'intel_forcewaked.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_guc_logger', 'intel_guc_logger.c',
> +	   dependencies : [lib_igt_tools_stub, libdrm, pthreads],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 25/31] tools/intel_infoframes: link with minimal sub-libraries
  2026-07-03 14:28 ` [PATCH i-g-t v2 25/31] tools/intel_infoframes: " Sebastian Brzezinka
@ 2026-07-03 21:08   ` Krzysztof Niemiec
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:08 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:28:59 GMT, Sebastian Brzezinka wrote:
> intel_infoframes only needs the register/MMIO helper subset, not the
> full libigt.so stack.
> 
> Switch to linking against lib_igt_reg_tools.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 32a345e9d..a31b6d0ed 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -20,7 +20,6 @@ tools_progs = [
>  	'intel_display_poller',
>  	'intel_framebuffer_dump',
>  	'intel_hdcp',
> -	'intel_infoframes',
>  	'intel_opregion_decode',
>  	'intel_panel_fitter',
>  	'intel_perf_counters',
> @@ -116,6 +115,11 @@ executable('intel_guc_logger', 'intel_guc_logger.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_infoframes', 'intel_infoframes.c',
> +	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 26/31] tools/intel_panel_fitter: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:08 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:29:00 GMT, Sebastian Brzezinka wrote:
> intel_panel_fitter only needs the register/MMIO helper subset, not the
> full libigt.so stack.
> 
> Switch to linking against lib_igt_reg_tools.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index a31b6d0ed..1a4e14ed3 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -21,7 +21,6 @@ tools_progs = [
>  	'intel_framebuffer_dump',
>  	'intel_hdcp',
>  	'intel_opregion_decode',
> -	'intel_panel_fitter',
>  	'intel_perf_counters',
>  	'intel_pm_rpm',
>  	'intel_reg_checker',
> @@ -120,6 +119,11 @@ executable('intel_infoframes', 'intel_infoframes.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_panel_fitter', 'intel_panel_fitter.c',
> +	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 27/31] tools/intel_watermark: link with minimal sub-libraries
  2026-07-03 14:29 ` [PATCH i-g-t v2 27/31] tools/intel_watermark: " Sebastian Brzezinka
@ 2026-07-03 21:08   ` Krzysztof Niemiec
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:08 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:29:01 GMT, Sebastian Brzezinka wrote:
> intel_watermark only needs the register/MMIO helper subset, not the full
> libigt.so stack.
> 
> Switch to linking against lib_igt_reg_tools.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 1a4e14ed3..0cc62b54d 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -26,7 +26,6 @@ tools_progs = [
>  	'intel_reg_checker',
>  	'intel_residency',
>  	'intel_tiling_detect',
> -	'intel_watermark',
>  	'intel_gem_info',
>  	'intel_gvtg_test',
>  	'dpcd_reg',
> @@ -124,6 +123,11 @@ executable('intel_panel_fitter', 'intel_panel_fitter.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_watermark', 'intel_watermark.c',
> +	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 28/31] tools/intel_display_poller: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:09 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:29:02 GMT, Sebastian Brzezinka wrote:
> intel_display_poller only needs the register/MMIO helper subset, not
> the full libigt.so stack.
> 
> Switch to linking against lib_igt_reg_tools.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   5  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/meson.build b/tools/meson.build
> index 0cc62b54d..2a084a0c4 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -17,7 +17,6 @@ tools_progs = [
>  	'intel_bios_dumper',
>  	'intel_display_bandwidth',
>  	'intel_display_crc',
> -	'intel_display_poller',
>  	'intel_framebuffer_dump',
>  	'intel_hdcp',
>  	'intel_opregion_decode',
> @@ -128,6 +127,11 @@ executable('intel_watermark', 'intel_watermark.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_display_poller', 'intel_display_poller.c',
> +	   dependencies : [lib_igt_reg_tools, pciaccess, libdrm],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 29/31] tools/intel_gvtg_test: link with minimal sub-libraries
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:10 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:29:03 GMT, Sebastian Brzezinka wrote:
> intel_gvtg_test only needs the core assert/log/skip helpers provided by
> igt_core plus the lightweight tool stubs. Replace the monolithic include
> with the minimal header set and stop linking against libigt.so.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   3  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/intel_gvtg_test.c | 2 +-
>  tools/meson.build       | 6 +++++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/intel_gvtg_test.c b/tools/intel_gvtg_test.c
> index 408e703bf..fe8f7a599 100644
> --- a/tools/intel_gvtg_test.c
> +++ b/tools/intel_gvtg_test.c
> @@ -30,7 +30,7 @@
>   */
>  #include "config.h"
>  
> -#include "igt.h"
> +#include "igt_core.h"
>  #include <errno.h>
>  #include <getopt.h>
>  #include <math.h>
> diff --git a/tools/meson.build b/tools/meson.build
> index 2a084a0c4..6e694164f 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -26,7 +26,6 @@ tools_progs = [
>  	'intel_residency',
>  	'intel_tiling_detect',
>  	'intel_gem_info',
> -	'intel_gvtg_test',
>  	'dpcd_reg',
>  	'lsgpu',
>  ]
> @@ -132,6 +131,11 @@ executable('intel_display_poller', 'intel_display_poller.c',
>  	   install_rpath : bindir_rpathdir,
>  	   install : true)
>  
> +executable('intel_gvtg_test', 'intel_gvtg_test.c',
> +	   dependencies : [lib_igt_tools_stub, pciaccess, libdrm, math],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  if libudev.found()
>  	intel_dp_compliance_src = [
>  		'intel_dp_compliance.c',
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 30/31] lib/igt_core: move igt_load_igtrc to igt_device_scan
  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
  0 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:20 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:29:04 GMT, Sebastian Brzezinka wrote:
> igt_load_igtrc() is used exclusively by igt_device_scan internals to read
> per-device configuration from the igtrc file.  Moving it from igt_core.c
> to igt_device_scan.c co-locates the function with its primary user and
> makes it possible for lsgpu to link against lib_igt_device_scan without
> needing the rest of libigt.
> 
> Update the declaration accordingly: remove from igt_core.h and add to
> igt_device_scan.h where the implementation now lives.
> 

What happens to runner/executor.c? It's also calling igt_load_igtrc()
directly, and is including igt_core.h both before and after the patch.

> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/igt_core.c        | 47 ------------------------------------------
>  lib/igt_core.h        |  2 --
>  lib/igt_device_scan.c | 48 +++++++++++++++++++++++++++++++++++++++++++
>  lib/igt_device_scan.h |  2 ++
>  4 files changed, 50 insertions(+), 49 deletions(-)
> 
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index a7c097d9e..2f737b01a 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -972,53 +972,6 @@ static void oom_adjust_for_doom(void)
>  
>  }
>  
> -/**
> - * load_igtrc:
> - *
> - * Load .igtrc from the path pointed to by #IGT_CONFIG_PATH or from
> - * home directory if that is not set. The returned keyfile needs to be
> - * deallocated using g_key_file_free().
> - *
> - * Returns: Pointer to the keyfile, NULL on error.
> - */
> -GKeyFile *igt_load_igtrc(void)
> -{
> -	char *key_file_env = NULL;
> -	char *key_file_loc = NULL;
> -	GError *error = NULL;
> -	GKeyFile *file;
> -	int ret;
> -
> -	/* Determine igt config path */
> -	key_file_env = getenv("IGT_CONFIG_PATH");
> -	if (key_file_env) {
> -		key_file_loc = key_file_env;
> -	} else {
> -		key_file_loc = malloc(100);
> -		snprintf(key_file_loc, 100, "%s/.igtrc", g_get_home_dir());
> -	}
> -
> -	/* Load igt config file */
> -	file = g_key_file_new();
> -	ret = g_key_file_load_from_file(file, key_file_loc,
> -					G_KEY_FILE_NONE, &error);
> -	if (!ret) {
> -		g_error_free(error);
> -		g_key_file_free(file);
> -		file = NULL;
> -
> -		goto out;
> -	}
> -
> -	g_clear_error(&error);
> -
> - out:
> -	if (!key_file_env && key_file_loc)
> -		free(key_file_loc);
> -
> -	return file;
> -}
> -
>  static void common_init_config(void)
>  {
>  	GError *error = NULL;
> diff --git a/lib/igt_core.h b/lib/igt_core.h
> index 3337293bc..afaf35aa8 100644
> --- a/lib/igt_core.h
> +++ b/lib/igt_core.h
> @@ -95,8 +95,6 @@ extern const char* __igt_test_description __attribute__((weak));
>  extern bool __igt_plain_output;
>  extern char *igt_frame_dump_path;
>  
> -struct _GKeyFile *igt_load_igtrc(void);
> -
>  /**
>   * IGT_TEST_DESCRIPTION:
>   * @str: description string
> diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
> index 7c7995224..a15a4624e 100644
> --- a/lib/igt_device_scan.c
> +++ b/lib/igt_device_scan.c
> @@ -33,6 +33,7 @@
>  #include <ctype.h>
>  #include <dirent.h>
>  #include <fcntl.h>
> +#include <glib.h>
>  #include <libudev.h>
>  #ifdef __linux__
>  #include <linux/limits.h>
> @@ -2477,3 +2478,50 @@ int igt_device_prepare_filtered_view(const char *vendor)
>  
>  	return gpu_count;
>  }
> +
> +/**
> + * igt_load_igtrc:
> + *
> + * Load .igtrc from the path pointed to by #IGT_CONFIG_PATH or from
> + * home directory if that is not set. The returned keyfile needs to be
> + * deallocated using g_key_file_free().
> + *
> + * Returns: Pointer to the keyfile, NULL on error.
> + */
> +GKeyFile *igt_load_igtrc(void)
> +{
> +	char *key_file_env = NULL;
> +	char *key_file_loc = NULL;
> +	GError *error = NULL;
> +	GKeyFile *file;
> +	int ret;
> +
> +	/* Determine igt config path */
> +	key_file_env = getenv("IGT_CONFIG_PATH");
> +	if (key_file_env) {
> +		key_file_loc = key_file_env;
> +	} else {
> +		key_file_loc = malloc(100);
> +		snprintf(key_file_loc, 100, "%s/.igtrc", g_get_home_dir());
> +	}
> +
> +	/* Load igt config file */
> +	file = g_key_file_new();
> +	ret = g_key_file_load_from_file(file, key_file_loc,
> +					G_KEY_FILE_NONE, &error);
> +	if (!ret) {
> +		g_error_free(error);
> +		g_key_file_free(file);
> +		file = NULL;
> +
> +		goto out;
> +	}
> +
> +	g_clear_error(&error);
> +
> + out:
> +	if (!key_file_env && key_file_loc)
> +		free(key_file_loc);
> +
> +	return file;
> +}
> diff --git a/lib/igt_device_scan.h b/lib/igt_device_scan.h
> index f24a193cd..5b04033e3 100644
> --- a/lib/igt_device_scan.h
> +++ b/lib/igt_device_scan.h
> @@ -103,4 +103,6 @@ int igt_open_render(struct igt_device_card *card);
>  /* Add or use filters to match multiGPU devices */
>  int igt_device_prepare_filtered_view(const char *vendor);
>  
> +struct _GKeyFile *igt_load_igtrc(void);
> +

Maybe it's just me but using the typedefed GKeyFile in the definition
and the non-typedefed struct _GKeyFile in the declaration seems a bit
weird, is there a reason why they don't match? If not it's a bit more
readable IMO to have them match but this might be out of scope of the
patch.

Thanks
Krzysztof

>  #endif /* __IGT_DEVICE_SCAN_H__ */
> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 31/31] tools/lsgpu: link with minimal sub-libraries
  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
  1 sibling, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:22 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, kamil.konieczny, krzysztof.karas, Ashutosh Dixit

On 2026-07-03 at 16:29:05 GMT, Sebastian Brzezinka wrote:
> lsgpu only needs device enumeration and the lightweight tool stubs.
> Replace #include "igt.h" with the minimal header set and stop linking
> against libigt.so.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   8  (ldd | wc -l)
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/lsgpu.c     | 2 +-
>  tools/meson.build | 7 ++++++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/lsgpu.c b/tools/lsgpu.c
> index 935371dea..7d6b70b9b 100644
> --- a/tools/lsgpu.c
> +++ b/tools/lsgpu.c
> @@ -34,7 +34,7 @@
>  #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 6e694164f..fbc6c0a00 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -27,7 +27,6 @@ tools_progs = [
>  	'intel_tiling_detect',
>  	'intel_gem_info',
>  	'dpcd_reg',
> -	'lsgpu',
>  ]
>  tool_deps = igt_deps
>  tool_deps += zlib
> @@ -172,6 +171,12 @@ install_data(['intel_gpu_abrt', 'intel-gfx-fw-info'], install_dir : bindir)
>  
>  install_subdir('registers', install_dir : datadir)
>  
> +executable('lsgpu', 'lsgpu.c',
> +	   dependencies : [lib_igt_device_scan, lib_igt_tools_stub,
> +	                    lib_igt_drm_stub, glib, libudev, libpci],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  executable('intel_gpu_top', 'intel_gpu_top.c',
>  	   install : true,
>  	   install_rpath : bindir_rpathdir,
> -- 

Reviewed-by: Krzysztof Niemiec <krzysztof.niemiec@intel.com>

Thanks
Krzysztof

> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library
  2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
                   ` (31 preceding siblings ...)
  2026-07-03 20:55 ` [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Krzysztof Niemiec
@ 2026-07-03 21:27 ` Krzysztof Niemiec
  32 siblings, 0 replies; 70+ messages in thread
From: Krzysztof Niemiec @ 2026-07-03 21:27 UTC (permalink / raw)
  To: Sebastian Brzezinka; +Cc: igt-dev, kamil.konieczny, krzysztof.karas

Hi Sebastian,

On 2026-07-03 at 16:28:34 GMT, Sebastian Brzezinka wrote:
> 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.

Also, maybe it's worth copying an example ld output here for one of the
tools, just to paint a better picture of how this series is improving
the linking process.

Thanks
Krzysztof

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library
  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
  0 siblings, 1 reply; 70+ messages in thread
From: Krzysztof Karas @ 2026-07-06  8:37 UTC (permalink / raw)
  To: Krzysztof Niemiec; +Cc: Sebastian Brzezinka, igt-dev, kamil.konieczny

Hi,

On 2026-07-03 at 22:55:15 +0200, Krzysztof Niemiec wrote:
> Hi Sebastian,
> 
> On 2026-07-03 at 16:28:34 GMT, Sebastian Brzezinka wrote:
> > 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).
> > 
> 
> I'm halfway through reading your series, and I can't help but think that
> this series is only remedying the real problem of building almost
> everything in the lib/ folder as one big shared library. We're putting
> literally everything in libigt.so, even though at the source level
> everything is split nicely into .c and .h files. Correct me if I'm
> understanding the build system wrong but it looks like we're already
> even building static libraries for all the little files in lib/, and
> linking them into libigt.so at the end.
+1

> 
> I guess at this point this is a matter of a tradeoff, because all tests
> depend on libigt.so; after splitting its contents into smaller shared
> objects it would be almost a herculean task to isolate the correct
> dependencies in all the tests. If it was done from the start it would be
> very much feasible, because tests and its build files would be written
> with that in mind, but you know, benefit of hindsight.
> 
> And then if the core libs would have been split more properly, this
> series wouldn't be really needed - the tools would just include and link
> what they need.
> 
> So this series is solving the problem very pragmatically in my opinion,
> to my mind it should absolutely go in. However, I think we should assess
> whether it's worth leaving at least a "TODO: modularize libigt.so"
> somewhere, so it could be addressed at some point in the future.
It might be worth figuring out why we are where we are. Was
"build everything into a library and suff as much into it as
possible" a conscious decision or a design oversight?

I imagine this might have never came up as a point before, so it
would be worth checking with the maintainers.

-- 
Best Regards,
Krzysztof

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 06/31] lib/igt_drm_stub: introduce for tools needing driver detection
  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
  1 sibling, 0 replies; 70+ messages in thread
From: Kamil Konieczny @ 2026-07-06 10:06 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, krzysztof.karas, krzysztof.niemiec, Ashutosh Dixit

Hi Sebastian,
On 2026-07-03 at 16:28:40 +0200, Sebastian Brzezinka wrote:
> Add drm/pciaccess-dependent stubs into a new igt_drm_stub.c.  This avoids
> pulling libdrm into tools that only need dep-free logging and exit stubs.
> 
> The new lib_igt_drm_stub static sub-library provides: igt_pci_system_init,
> is_i915_device, is_intel_device, xe_dev_id and __drm_open_driver.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  lib/igt_drm_stub.c | 132 +++++++++++++++++++++++++++++++++++++++++++++
>  lib/meson.build    |   9 ++++
>  2 files changed, 141 insertions(+)
>  create mode 100644 lib/igt_drm_stub.c
> 
> diff --git a/lib/igt_drm_stub.c b/lib/igt_drm_stub.c
> new file mode 100644
> index 000000000..f8ac3a992
> --- /dev/null
> +++ b/lib/igt_drm_stub.c
> @@ -0,0 +1,132 @@
> +/*
> + * Copyright © 2026 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a

Please remove this long text and use SPDX instead.

> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + */
> +
> +/*
> + * Minimal DRM/PCI stubs for tools that need driver detection and device
> + * opening but do not link the full libigt.so.  Requires libdrm and pciaccess.

Please also write that this is a reimplemntation, and write
down which libs it is reimplementing.

> + */
> +
> +#include <errno.h>
> +#include <fcntl.h>
> +#include <limits.h>
> +#include <pciaccess.h>
> +#include <stdbool.h>
> +#include <stdint.h>
> +#include <stdio.h>
> +#include <string.h>
> +#include <sys/stat.h>
> +#include <sys/sysmacros.h>
> +#include <unistd.h>
> +#include <xf86drm.h>
> +
> +#include "drmtest.h"
> +
> +int igt_pci_system_init(void)
> +{
> +	return pci_system_init();
> +}
> +
> +static bool driver_name_matches(int fd, const char *name)
> +{
> +	drmVersionPtr version;
> +	bool match = false;
> +
> +	version = drmGetVersion(fd);
> +	if (!version)
> +		return false;
> +
> +	match = version->name_len > 0 && !strcmp(version->name, name);
> +	drmFreeVersion(version);
> +
> +	return match;
> +}
> +
> +bool is_i915_device(int fd)
> +{
> +	return driver_name_matches(fd, "i915");
> +}
> +
> +bool is_intel_device(int fd)
> +{
> +	return is_i915_device(fd) || driver_name_matches(fd, "xe");
> +}
> +
> +static uint16_t read_pci_device_id(int fd)
> +{
> +	char path[PATH_MAX], buf[32];
> +	struct stat st;
> +	int sysfs, len;
> +	unsigned int devid;
> +
> +	if (fstat(fd, &st) || !S_ISCHR(st.st_mode))
> +		return 0;
> +
> +	snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/device",
> +		 major(st.st_rdev), minor(st.st_rdev));
> +	sysfs = open(path, O_RDONLY);
> +	if (sysfs < 0)
> +		return 0;
> +
> +	len = read(sysfs, buf, sizeof(buf) - 1);
> +	close(sysfs);
> +	if (len <= 0)
> +		return 0;
> +
> +	buf[len] = '\0';
> +	if (sscanf(buf, "0x%x", &devid) != 1)
> +		return 0;
> +
> +	return devid;
> +}
> +
> +/* Matches the declaration in lib/xe/xe_query.h declared here to satisfy
> + * -Wmissing-prototypes without pulling in the heavy xe_query.h header.
> + */
> +uint16_t xe_dev_id(int fd);

Why do you repeat it when it is just below?

> +uint16_t xe_dev_id(int fd)
> +{
> +	return read_pci_device_id(fd);
> +}
> +
> +int __drm_open_driver(int chipset)
> +{
> +	char path[PATH_MAX];
> +	int fd;
> +
> +	for (int i = 0; i < 16; i++) {

Looks like we need a separate header with few magic constants,
like 16 here.

Regards,
Kamil

> +		snprintf(path, sizeof(path), "/dev/dri/card%d", i);
> +		fd = open(path, O_RDWR | O_CLOEXEC);
> +		if (fd < 0)
> +			continue;
> +
> +		if ((chipset == DRIVER_INTEL && is_i915_device(fd)) ||
> +		    (chipset == DRIVER_XE && driver_name_matches(fd, "xe")) ||
> +		    (chipset == DRIVER_ANY && is_intel_device(fd)))
> +			return fd;
> +
> +		close(fd);
> +	}
> +
> +	errno = ENODEV;
> +	return -1;
> +}
> diff --git a/lib/meson.build b/lib/meson.build
> index a57c1eb8d..484a912d7 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -356,6 +356,15 @@ lib_igt_tools_stub_build = static_library('igt_tools_stub',
>  lib_igt_tools_stub = declare_dependency(link_with : lib_igt_tools_stub_build,
>  					include_directories : inc)
>  
> +lib_igt_drm_stub_build = static_library('igt_drm_stub',
> +	['igt_drm_stub.c'],
> +	dependencies : [libdrm, pciaccess],
> +	include_directories : inc)
> +
> +lib_igt_drm_stub = declare_dependency(link_with : lib_igt_drm_stub_build,
> +				      dependencies : [libdrm, pciaccess],
> +				      include_directories : inc)
> +
>  scan_dep = [
>  	glib,
>  	libpci,
> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 10/31] lib/i915/intel_decode: introduce static sub-library for tools
  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
  1 sibling, 0 replies; 70+ messages in thread
From: Kamil Konieczny @ 2026-07-06 10:58 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, krzysztof.karas, krzysztof.niemiec, Ashutosh Dixit

Hi Sebastian,
On 2026-07-03 at 16:28:44 +0200, Sebastian Brzezinka wrote:
> Add lib_i915_decode built from i915/intel_decode.c and instdone.c.
> This lets tools like intel_error_decode link only the decode logic
> without pulling in the full libigt.so.
> 
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

Please make sure your series will compile patch after patch,
so bisetion will work. Here, this patch breaks it:

./lib/igt_fb.h:32:10: fatal error: cairo.h: No such file or directory
   32 | #include <cairo.h>
         |          ^~~~~~~~~
	 compilation terminated.

One way to do it: git rebase -i origin -x 'ninja -C build'
but when you introduce changes in meson.build it is better to have
a script which will delete build folder first and then builds:
git rebase -i origin -x ./compile.sh

Regards,
Kamil

> ---
>  lib/meson.build | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/lib/meson.build b/lib/meson.build
> index 93db217f8..ba4ece3a2 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -423,6 +423,18 @@ lib_igt_halffloat = declare_dependency(link_with : lib_igt_halffloat_build,
>  				       dependencies : [math],
>  				       include_directories : inc)
>  
> +lib_i915_decode_build = static_library('i915_decode',
> +	['i915/intel_decode.c',
> +	 'instdone.c',
> +	],
> +	dependencies : [lib_igt_chipset],
> +	include_directories : inc)
> +
> +lib_i915_decode = declare_dependency(link_with : lib_i915_decode_build,
> +				     dependencies : [lib_igt_chipset,
> +				                     lib_igt_tools_stub],
> +				     include_directories : inc)
> +
>  i915_perf_files = [
>    'igt_list.c',
>    'i915/perf.c',
> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 31/31] tools/lsgpu: link with minimal sub-libraries
  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
  1 sibling, 0 replies; 70+ messages in thread
From: Kamil Konieczny @ 2026-07-06 11:07 UTC (permalink / raw)
  To: Sebastian Brzezinka
  Cc: igt-dev, krzysztof.karas, krzysztof.niemiec, Ashutosh Dixit

Hi Sebastian,
On 2026-07-03 at 16:29:05 +0200, Sebastian Brzezinka wrote:
> lsgpu only needs device enumeration and the lightweight tool stubs.
> Replace #include "igt.h" with the minimal header set and stop linking
> against libigt.so.
> 
> ldd before: 35  (ldd | wc -l)
> ldd after:   8  (ldd | wc -l)
> 

Please add Closes: tag here.

Regards,
Kamil

> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
> Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tools/lsgpu.c     | 2 +-
>  tools/meson.build | 7 ++++++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/lsgpu.c b/tools/lsgpu.c
> index 935371dea..7d6b70b9b 100644
> --- a/tools/lsgpu.c
> +++ b/tools/lsgpu.c
> @@ -34,7 +34,7 @@
>  #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 6e694164f..fbc6c0a00 100644
> --- a/tools/meson.build
> +++ b/tools/meson.build
> @@ -27,7 +27,6 @@ tools_progs = [
>  	'intel_tiling_detect',
>  	'intel_gem_info',
>  	'dpcd_reg',
> -	'lsgpu',
>  ]
>  tool_deps = igt_deps
>  tool_deps += zlib
> @@ -172,6 +171,12 @@ install_data(['intel_gpu_abrt', 'intel-gfx-fw-info'], install_dir : bindir)
>  
>  install_subdir('registers', install_dir : datadir)
>  
> +executable('lsgpu', 'lsgpu.c',
> +	   dependencies : [lib_igt_device_scan, lib_igt_tools_stub,
> +	                    lib_igt_drm_stub, glib, libudev, libpci],
> +	   install_rpath : bindir_rpathdir,
> +	   install : true)
> +
>  executable('intel_gpu_top', 'intel_gpu_top.c',
>  	   install : true,
>  	   install_rpath : bindir_rpathdir,
> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library
  2026-07-06  8:37   ` Krzysztof Karas
@ 2026-07-06 11:18     ` Kamil Konieczny
  0 siblings, 0 replies; 70+ messages in thread
From: Kamil Konieczny @ 2026-07-06 11:18 UTC (permalink / raw)
  To: Krzysztof Karas; +Cc: Krzysztof Niemiec, Sebastian Brzezinka, igt-dev

Hi Krzysztof,
On 2026-07-06 at 08:37:59 +0000, Krzysztof Karas wrote:
> Hi,
> 
> On 2026-07-03 at 22:55:15 +0200, Krzysztof Niemiec wrote:
> > Hi Sebastian,
> > 
> > On 2026-07-03 at 16:28:34 GMT, Sebastian Brzezinka wrote:
> > > 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).
> > > 
> > 
> > I'm halfway through reading your series, and I can't help but think that
> > this series is only remedying the real problem of building almost
> > everything in the lib/ folder as one big shared library. We're putting
> > literally everything in libigt.so, even though at the source level
> > everything is split nicely into .c and .h files. Correct me if I'm
> > understanding the build system wrong but it looks like we're already
> > even building static libraries for all the little files in lib/, and
> > linking them into libigt.so at the end.
> +1
> 
> > 
> > I guess at this point this is a matter of a tradeoff, because all tests
> > depend on libigt.so; after splitting its contents into smaller shared
> > objects it would be almost a herculean task to isolate the correct
> > dependencies in all the tests. If it was done from the start it would be
> > very much feasible, because tests and its build files would be written
> > with that in mind, but you know, benefit of hindsight.
> > 
> > And then if the core libs would have been split more properly, this
> > series wouldn't be really needed - the tools would just include and link
> > what they need.
> > 
> > So this series is solving the problem very pragmatically in my opinion,
> > to my mind it should absolutely go in. However, I think we should assess
> > whether it's worth leaving at least a "TODO: modularize libigt.so"
> > somewhere, so it could be addressed at some point in the future.
> It might be worth figuring out why we are where we are. Was
> "build everything into a library and suff as much into it as
> possible" a conscious decision or a design oversight?
> 
> I imagine this might have never came up as a point before, so it
> would be worth checking with the maintainers.

Or git logs?

That was when igt project moved from autotools to meson. I guess
it was ok for developers to have just one big linked lib. Later
users filed ticket(s) on GitLab.

Regards,
Kamil


> 
> -- 
> Best Regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2026-07-06 11:18 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 14:28 [PATCH i-g-t v2 00/31] tools: remove unnecessary shared library Sebastian Brzezinka
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox