[PATCH i-g-t v7 08/48] lib/igt_kms: Expose reset_connectors_at_exit

Louis Chauvet
2026-02-23T12:08:56Z

reset_connectors_at_exit is used by i915 DP helpers, expose it so it can
be reused in a different file.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
---
lib/igt_kms.c | 7 ++++++-
lib/igt_kms.h | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index d76ae3cccae4..2ea774d79d8a 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1577,7 +1577,12 @@ void kmstest_set_vt_text_mode(void)
igt_assert(set_vt_mode(KD_TEXT) >= 0);
}

-static void reset_connectors_at_exit(int sig)
+/**
+ * reset_connectors_at_exit:
+ *
+ * Exit handler used to remove any forced state from the connectors.
+ */
+void reset_connectors_at_exit(int sig)
{
igt_reset_connectors();
}
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index a1da1b5a0dd7..23b7110fafca 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -152,6 +152,7 @@ int kmstest_get_crtc_index_from_id(int fd, int crtc_id);
void kmstest_set_vt_graphics_mode(void);
void kmstest_restore_vt_mode(void);
void kmstest_set_vt_text_mode(void);
+void reset_connectors_at_exit(int sig);

enum igt_atomic_crtc_properties {
IGT_CRTC_CTM = 0,

--
2.52.0