Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1720ECD6E75 for ; Thu, 4 Jun 2026 20:03:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF2B911A2D0; Thu, 4 Jun 2026 20:03:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="P/TDxUo6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5649111A2CA for ; Thu, 4 Jun 2026 20:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1780603334; x=1812139334; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1SC0/qp+j/FCeWMXSw2uSqshBPhteaIRhSgjS+k9n0c=; b=P/TDxUo61bal9Q/JmCA3QXI5544gEKsv66zEZDFBy5j4hvGoG9IwgwxG TtKc/OmZGzE+Er9Q5kUo+VwZFUn4HG3TDgSQY7Lx00/NfPBSW288Wnhbz ViBmzWWC6Zik/Ok8HRYuTLkqp2YfYK2edbm5nUHWjw+RuxwXuzK+gU9zg rnNs3BboPmLPCsJ/pDJ9qYpL3fyBDYyG6DBXi8JMkEvoQUU6tHj9VlE9q r/QrvazY7Hg5yc8BUF5ZBDuIqD8A8+FwWKq41TKxUcNwaVy1xuxX0AHHX xs8KUWUnmZQ/PqvddPO89uD6ckfuN00V+th+MULvVOqg9h7OiqrElYYEp g==; X-CSE-ConnectionGUID: bZHyA2M0TDWVf6SH254jLQ== X-CSE-MsgGUID: /1aM1Wt9QyeK8hCdNwWHcQ== X-IronPort-AV: E=McAfee;i="6800,10657,11807"; a="81622011" X-IronPort-AV: E=Sophos;i="6.24,187,1774335600"; d="scan'208";a="81622011" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2026 13:02:14 -0700 X-CSE-ConnectionGUID: wW4XUnnXRKq2n7yWcytV0A== X-CSE-MsgGUID: fCcp9J1xQu+vdkTwXml8IQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,187,1774335600"; d="scan'208";a="248573299" Received: from linux-x299-aorus-gaming-3-pro.iind.intel.com ([10.223.34.115]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2026 13:02:11 -0700 From: Swati Sharma To: igt-dev@lists.freedesktop.org Cc: Swati Sharma , Karthik B S Subject: [PATCH i-g-t, v8 2/5] tests/intel/kms_joiner_helper: Add igt_get_joined_pipes_name() Date: Fri, 5 Jun 2026 01:40:59 +0530 Message-Id: <20260604201102.2583200-3-swati2.sharma@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260604201102.2583200-1-swati2.sharma@intel.com> References: <20260604201102.2583200-1-swati2.sharma@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" Add function to transform the enum into a string. v2: -Improved func() doc (Jeevan) v3: -Return names without '-' dash prefix (Santhosh) v4: -Move from lib/igt_kms to tests/intel/kms_joiner_helper (Jani) Signed-off-by: Swati Sharma Reviewed-by: Karthik B S --- tests/intel/kms_joiner_helper.c | 22 ++++++++++++++++++++++ tests/intel/kms_joiner_helper.h | 1 + 2 files changed, 23 insertions(+) diff --git a/tests/intel/kms_joiner_helper.c b/tests/intel/kms_joiner_helper.c index e24d7ce94..0aa409ac2 100644 --- a/tests/intel/kms_joiner_helper.c +++ b/tests/intel/kms_joiner_helper.c @@ -183,3 +183,25 @@ bool igt_assign_pipes_for_outputs(int drm_fd, } return true; } + +/** + * igt_get_joined_pipes_name: + * @val: joined_pipes enum value + * + * Returns: A readable string for the given joined_pipes enum value. + */ +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 "bigjoiner"; + case JOINED_PIPES_ULTRA_JOINER: + return "ultrajoiner"; + default: + igt_assert(false); + } +} diff --git a/tests/intel/kms_joiner_helper.h b/tests/intel/kms_joiner_helper.h index 6d21e7eb0..1ea871a3b 100644 --- a/tests/intel/kms_joiner_helper.h +++ b/tests/intel/kms_joiner_helper.h @@ -17,6 +17,7 @@ bool igt_assign_pipes_for_outputs(int drm_fd, uint32_t *used_pipes_mask, uint32_t master_pipes_mask, uint32_t valid_pipes_mask); +const char *igt_get_joined_pipes_name(enum joined_pipes val); enum force_joiner_mode { FORCE_JOINER_ENABLE = 0, -- 2.25.1