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 40DB6EFCD6E for ; Mon, 9 Mar 2026 09:25:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED98010E4BA; Mon, 9 Mar 2026 09:25:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="kngsFDB6"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F1AA10E4BA for ; Mon, 9 Mar 2026 09:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773048347; x=1804584347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=o7ZVWgGUPDpQONBRwPw6jylGxF0+ZTKpnTDHUCSR5EI=; b=kngsFDB6MRLBw2cPSFK6EC6LSdXmOEhGvXUDPNA8WHy3lr6vpam+tmgo M8GvtKGicUCxmddgGEIRZjKofLbJWGM4mT58XnpwzxsqOq+yUz1uh0mzj hOly0b5oCRJ6UR6sWcsnY9H6gTBiJrjZoM78P1OgOp/kLMwJc1UfzXVsC BFv2XygtnB3hhT06i3GJmJPkpLXBK3+7re9y2p9bHvVP4qdMVLjDNFgqZ nUc3IpLzLJT4c1MMqgpUtAchUVeA4gt4NayWZEz46mP2WFSBTC7UfGVOj nix5AxMPCxQr1/hZRKRux358607HbLXs1SSDt0TYGlSlsRUPub9MUEjtX w==; X-CSE-ConnectionGUID: kybeoH6ISkCrrUTmZwcakA== X-CSE-MsgGUID: XVMKECanRlOwYY7ja61ITA== X-IronPort-AV: E=McAfee;i="6800,10657,11723"; a="77918373" X-IronPort-AV: E=Sophos;i="6.23,109,1770624000"; d="scan'208";a="77918373" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2026 02:25:46 -0700 X-CSE-ConnectionGUID: GqsbentMRZmgGykwy+jQvg== X-CSE-MsgGUID: HTb6xscrTX65DXbUNAOJ0A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,109,1770624000"; d="scan'208";a="257620322" Received: from administrator-system-product-name.igk.intel.com (HELO dev-417.igk.intel.com) ([10.91.214.181]) by orviesa001.jf.intel.com with ESMTP; 09 Mar 2026 02:25:44 -0700 From: =?UTF-8?q?Micha=C5=82=20Grzelak?= To: igt-dev@lists.freedesktop.org Cc: =?UTF-8?q?Micha=C5=82=20Grzelak?= , Mohammed Thasleem Subject: [PATCH i-g-t v8 4/6] tests/kms_flip: limit number of outputs wrt suspend Date: Mon, 9 Mar 2026 10:25:26 +0100 Message-ID: <20260309092528.3336467-5-michal.grzelak@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260309092528.3336467-1-michal.grzelak@intel.com> References: <20260309092528.3336467-1-michal.grzelak@intel.com> 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" When running suspend subtests on single output, we can still hit the timeout by testing too much outputs. Default to testing 3 outputs. Add command-line parameter to run on all outputs. Signed-off-by: MichaƂ Grzelak --- tests/kms_flip.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 917c5ed6f..ae38096aa 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -264,12 +264,14 @@ #define RUN_PAIR 2 #define PAIR_LIMIT 3 +#define CONN_LIMIT 3 #ifndef DRM_CAP_TIMESTAMP_MONOTONIC #define DRM_CAP_TIMESTAMP_MONOTONIC 6 #endif static bool all_crtcs = false; +static bool all_conns = false; static bool all_pairs = false; drmModeRes *resources; @@ -1822,6 +1824,7 @@ static void run_test(int duration, int flags) { struct test_output o; int i, n, modes = 0; + int conn_count = 0; /* No tiling support in XE. */ if (is_xe_device(drm_fd) && flags & TEST_FENCE_STRESS) @@ -1887,6 +1890,10 @@ static void run_test(int duration, int flags) if ((flags & TEST_SUSPEND) && !all_crtcs && n != 0) continue; + /* Limit number of displays run */ + if ((flags & TEST_SUSPEND) && !all_conns && conn_count >= CONN_LIMIT) + continue; + memset(&o, 0, sizeof(o)); o.count = 1; o._connector[0] = resources->connectors[i]; @@ -1895,8 +1902,15 @@ static void run_test(int duration, int flags) o.depth = 24; crtc_idx = n; - run_test_on_crtc_set(&o, &crtc_idx, RUN_TEST, - resources->count_crtcs, duration); + + connector_find_preferred_mode(o._connector[0], n, &o); + if (o.mode_valid) { + run_test_on_crtc_set(&o, &crtc_idx, RUN_TEST, + resources->count_crtcs, duration); + conn_count++; + } else { + free_test_output(&o); + } } } @@ -2071,10 +2085,11 @@ static int opt_handler(int opt, int opt_index, void *data) } const char *help_str = + " -c \tRun on all connectors. (By default suspend subtests will run on 3 connectors)\n" " -e \tRun on all CRTCs. (By default subtests will run on two CRTCs)\n" " -p \tRun on all output pairs. (By default 2x-* suspend subtests will run on 3 pairs)\n"; -int igt_main_args("ep", NULL, help_str, opt_handler, NULL) +int igt_main_args("cep", NULL, help_str, opt_handler, NULL) { struct { int duration; -- 2.45.2