Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, Swati Sharma <swati2.sharma@intel.com>
Subject: [PATCH i-g-t 1/4] lib/igt_kms: Add igt_get_joined_pipes_name()
Date: Wed,  8 Jan 2025 00:27:06 +0530	[thread overview]
Message-ID: <20250107185709.116756-2-swati2.sharma@intel.com> (raw)
In-Reply-To: <20250107185709.116756-1-swati2.sharma@intel.com>

Add function to transform the enum into a string.

Signed-off-by: Swati Sharma <swati2.sharma@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


  reply	other threads:[~2025-01-07 18:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 18:57 [PATCH i-g-t 0/4] Add dsc+bigjoiner subtest Swati Sharma
2025-01-07 18:57 ` Swati Sharma [this message]
2025-01-08 18:21   ` [PATCH i-g-t 1/4] lib/igt_kms: Add igt_get_joined_pipes_name() B, Jeevan
2025-01-07 18:57 ` [PATCH i-g-t 2/4] lib/igt_kms: Add igt_is_(big|ultra)_joiner_supported_by_source() Swati Sharma
2025-01-08 18:26   ` B, Jeevan
2025-01-07 18:57 ` [PATCH i-g-t 3/4] tests/intel/kms_dsc_helper: Add helper func() Swati Sharma
2025-03-12  8:46   ` Nautiyal, Ankit K
2025-01-07 18:57 ` [PATCH i-g-t 4/4] tests/intel/kms_dsc: Add force dsc and joiner test cases Swati Sharma
2025-03-12  9:09   ` Nautiyal, Ankit K
2025-03-12 12:51     ` Nautiyal, Ankit K
2025-01-07 22:56 ` ✗ Xe.CI.BAT: failure for Add dsc+bigjoiner subtest (rev4) Patchwork
2025-01-07 22:57 ` ✓ i915.CI.BAT: success " Patchwork
2025-01-08  6:21 ` ✗ i915.CI.Full: failure " Patchwork
2025-01-09 14:20 ` ✗ Xe.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250107185709.116756-2-swati2.sharma@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox