[PATCH i-g-t 1/4] lib/igt_kms: Add igt_get_joined_pipes_name()
Swati Sharma
swati2.sharma at intel.com
Tue Jan 7 18:57:06 UTC 2025
Add function to transform the enum into a string.
Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
---
lib/igt_kms.c | 23 +++++++++++++++++++++++
lib/igt_kms.h | 1 +
2 files changed, 24 insertions(+)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index a67d17c4f..8ee8741d9 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -61,6 +61,7 @@
#include "igt_device.h"
#include "igt_sysfs.h"
#include "sw_sync.h"
+#include "xe/xe_query.h"
#ifdef HAVE_CHAMELIUM
#include "igt_chamelium.h"
#endif
@@ -1803,6 +1804,28 @@ bool kmstest_force_connector_joiner(int drm_fd, drmModeConnector *connector, int
return true;
}
+/**
+ * igt_get_joined_pipes_name:
+ * @val: forced value
+ *
+ * Simple function to transform the enum into a string.
+ */
+const char *igt_get_joined_pipes_name(enum joined_pipes val)
+{
+ switch (val) {
+ case JOINED_PIPES_DEFAULT:
+ return "";
+ case JOINED_PIPES_NONE:
+ return "-none";
+ case JOINED_PIPES_BIG_JOINER:
+ return "-big-joiner";
+ case JOINED_PIPES_ULTRA_JOINER:
+ return "-ultra-joiner";
+ default:
+ igt_assert(false);
+ }
+}
+
/**
* kmstest_force_edid:
* @drm_fd: drm file descriptor
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 1e2a927ab..c4d76bdcb 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -1275,5 +1275,6 @@ int igt_get_dp_pending_retrain(int drm_fd, igt_output_t *output);
void igt_reset_link_params(int drm_fd, igt_output_t *output);
int igt_backlight_read(int *result, const char *fname, igt_backlight_context_t *context);
int igt_backlight_write(int value, const char *fname, igt_backlight_context_t *context);
+const char *igt_get_joined_pipes_name(enum joined_pipes val);
#endif /* __IGT_KMS_H__ */
--
2.25.1
More information about the igt-dev
mailing list