Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E9EB606A326 for ; Fri, 6 Nov 2026 18:17:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=LD2pCTUv Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D472F10E20C; Fri, 6 Nov 2026 18:17:44 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 86801112F77 for ; Fri, 6 Nov 2026 18:09:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1793988558; x=1825524558; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jgg+yef6PQ/ZfFTDEcHFz+o6de2F5Tw6F3hV5ASk61k=; b=LD2pCTUvhI2Q+VeyC2GtS64GRMNh9EtvuQLgOn9iOWgAd+B03tlJzKgt Sv+GKkLv9/dmeC9UiGAd2zm0XugOXpPmOeB+wlx+77aLC+ejbO8h0Gaq8 +baz20spgMMyBWChWycNCPhHFtIntlVyo5V3qyMhFw97Hl7NdCGQFXkNs u6GTXma6P+YUXadr6YTZYaz9Vs7zj+HmKujlZQjfxPawBHAHRodg9aoxo mzH3FKEn7iryMe45YZH3x2JCIhLr5s+/Nkzt0e1Lf8dYX3EsoocsDTdKn AxC/cX8sg+lhdQmJXHGcJPY07WoAxRa0nKGjNfksllOQ5uo9msYx2labt A==; X-CSE-ConnectionGUID: L1UmIFVaRe2yEvKp43kSew== X-CSE-MsgGUID: R0oaaSBnSIKqYAixAjA9sQ== X-IronPort-AV: E=McAfee;i="6800,10657,11958"; a="2723931" X-IronPort-AV: E=Sophos;i="6.27,197,1787036400"; d="scan'208";a="2723931" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2026 10:09:17 -0800 X-CSE-ConnectionGUID: +qgAaMPFSsG8ThISMOlM/Q== X-CSE-MsgGUID: +9MMD92ARiqGTSout1QSyg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,197,1787036400"; d="scan'208";a="7362637" Received: from dev-417.igk.intel.com ([10.91.214.181]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2026 10:09:16 -0800 From: =?UTF-8?q?Micha=C5=82=20Grzelak?= To: igt-dev@lists.freedesktop.org Cc: Karthik B S , Swati Sharma , =?UTF-8?q?Juha-Pekka=20Heikkil=C3=A4?= , Jani Nikula , =?UTF-8?q?Micha=C5=82=20Grzelak?= , =?UTF-8?q?Micha=C5=82=20Grzelak?= Subject: [PATCH i-g-t v9 7/9] tests/intel/kms_ccs: set mask for available hardware pipes Date: Fri, 6 Nov 2026 19:08:47 +0100 Message-ID: <20261106180849.156578-8-michal.grzelak@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20261106180849.156578-1-michal.grzelak@linux.intel.com> References: <20261106180849.156578-1-michal.grzelak@linux.intel.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 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-Archive: List-Post: List-Help: List-Subscribe: , Sender: "igt-dev" X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Mapping from hardware pipe into CRTC is needed when testing suspend since we need to run test on at least first and last pipe. Currently there is a direct mapping between CRTC and hardware pipe but this will break after introduction of pipe reordering. Compute array of all available hardware pipes. While doing it also compute first and last pipe. Skip whole test when there is no available pipe. Skip testing CRTCs that map to unavailable pipes. Currently this is a no-op but this will change after limiting suspend tests to first and last pipe. v7->v8 - add patch Reviewed-by: Juha-Pekka Heikkila Signed-off-by: MichaƂ Grzelak --- tests/intel/kms_ccs.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c index 8526f1ccfd..734dafd110 100644 --- a/tests/intel/kms_ccs.c +++ b/tests/intel/kms_ccs.c @@ -189,6 +189,7 @@ typedef struct { bool user_seed; enum igt_commit_style commit; int fb_list_length; + bool available_pipes[IGT_MAX_PIPES]; bool do_hibernate; bool all_outputs; struct { @@ -1088,6 +1089,30 @@ static int test_ccs(data_t *data) return valid_tests; } +static bool set_available_hw_pipes(data_t *data) +{ + enum hardware_pipe first_pipe = IGT_MAX_PIPES; + enum hardware_pipe last_pipe = PIPE_NONE; + enum hardware_pipe hw_pipe; + igt_crtc_t *crtc; + + for_each_crtc(&data->display, crtc) { + hw_pipe = crtc->hardware_pipe; + data->available_pipes[hw_pipe] = true; + + if (last_pipe < hw_pipe) + last_pipe = hw_pipe; + + if (first_pipe > hw_pipe) + first_pipe = hw_pipe; + } + + if (first_pipe == IGT_MAX_PIPES || last_pipe == PIPE_NONE) + return false; + + return true; +} + static bool skip_plane(data_t *data, igt_plane_t *plane) { int index = plane->index; @@ -1176,6 +1201,9 @@ static void test_output(data_t *data, const int testnum) if (!intel_pipe_output_combo_valid(&data->display)) continue; + if (!data->available_pipes[crtc->hardware_pipe]) + continue; + igt_dynamic_f("pipe-%s-%s", igt_crtc_name(crtc), data->output->name) { int valid_tests = 0; @@ -1269,6 +1297,9 @@ int igt_main_args("csrn:", NULL, help_str, opt_handler, &data) data.fb_list_length = 0; } + igt_fixture() + igt_require_f(set_available_hw_pipes(&data), "no pipe available\n"); + for (int c = 0; c < ARRAY_SIZE(tests); c++) test_output(&data, c); -- 2.45.2