[PATCH RESEND i-g-t v4 10/31] lib/i915/intel_decode: replace igt.h with minimal headers

Sebastian Brzezinka <[email protected]> Wed, 29 Jul 2026 13:03:27 +0200
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <005fcfad1dfd13b9e8dc56d64a6da59e8c5cc1d3.1785152675.git.sebastian.brzezinka@intel.com>
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 <[email protected]>
Acked-by: Ashutosh Dixit <[email protected]>
Reviewed-by: Krzysztof Niemiec <[email protected]>
Reviewed-by: Krzysztof Karas <[email protected]>
---
 lib/i915/intel_decode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/i915/intel_decode.c b/lib/i915/intel_decode.c
index b78993c47..0b404ae53 100644
--- a/lib/i915/intel_decode.c
+++ b/lib/i915/intel_decode.c
@@ -28,8 +28,9 @@
 #include <stdbool.h>
 #include <stdarg.h>
 #include <string.h>
+#include <xf86drm.h>
 
-#include "igt.h"
+#include "intel_chipset.h"
 #include "intel_decode.h"
 
 /* Struct for tracking intel_decode state. */
-- 
2.53.0