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 0A502606A32D for ; Fri, 4 Dec 2026 17:49:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=gMcfs1mh Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B428C112FCF; Fri, 4 Dec 2026 17:49:08 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7BE351130CA for ; Fri, 4 Dec 2026 17:40:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796406038; x=1827942038; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ito7JuBekRQjEvpF7Lew6ZUP0Yw0Ie63EdjGWEH3hD0=; b=gMcfs1mh/3MkKYuXhjbTHMByqJ3f7f/HDO85+k2frtLVTDOM/peOOFVP SxagIEcsQHA5zljnG0iCPcslgvfI0Q7F6OyHwYGB8gXOPuCdPtl7+fGfc aRTp2wFoxIYkEoXUjA+ozPCNspgssi9NB5a1iEUGMs03GQ59fNzT6jPeS ogcQudZb60027UbKNzQ6dkjfrKmpUTpauEa2hj8TSL71mManbp1204UuL ehSc0IDiFLJh9ySnX8tb9aXwoO+pUxPlsMnQw5HmIXT+S9MBnj2wVMvtf tn/ob4vTaCojKZra7zgjV6NsMvsweBr2zDdvelQ2opsdaU2pJbGmH65yX g==; X-CSE-ConnectionGUID: PNu5j+xtTDe2Ej1VJjXt1w== X-CSE-MsgGUID: ytn7QWgPTcOL95N9aObsgw== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="5405696" X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="5405696" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 09:40:38 -0800 X-CSE-ConnectionGUID: mdbbrMv+QW6X5omvbnbtUw== X-CSE-MsgGUID: a2x3phLmQPGgUJX+S4wKJQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="14035439" Received: from dev-417.igk.intel.com ([10.91.214.181]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 09:40:37 -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 v11 7/9] tests/intel/kms_ccs: set bitmask for available hardware pipes Date: Fri, 4 Dec 2026 18:40:14 +0100 Message-ID: <20261204174016.1914923-8-michal.grzelak@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20261204174016.1914923-1-michal.grzelak@linux.intel.com> References: <20261204174016.1914923-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=-17.2 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 bitmask of all available CRTCs. While doing it also compute first and last 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. v10->v11 - use bitmask instead of bools' array (Jani) v7->v8 - add patch Reviewed-by: Juha-Pekka Heikkila Signed-off-by: MichaƂ Grzelak --- tests/intel/kms_ccs.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c index 7dcf9d536d..44e7907974 100644 --- a/tests/intel/kms_ccs.c +++ b/tests/intel/kms_ccs.c @@ -189,8 +189,10 @@ typedef struct { bool user_seed; enum igt_commit_style commit; int fb_list_length; + uint32_t crtc_index_mask; bool do_hibernate; bool all_outputs; + bool all_crtcs; struct { struct igt_fb fb; int width, height; @@ -928,6 +930,25 @@ static int test_ccs(data_t *data) return valid_tests; } +static uint32_t get_crtc_index_mask(data_t *data) +{ + uint32_t crtc_index_mask = 0; + igt_crtc_t *first_pipe_crtc = NULL; + igt_crtc_t *last_pipe_crtc = NULL; + igt_crtc_t *crtc; + + for_each_crtc(&data->display, crtc) { + if (!first_pipe_crtc || crtc->hardware_pipe < first_pipe_crtc->hardware_pipe) + first_pipe_crtc = crtc; + if (!last_pipe_crtc || crtc->hardware_pipe > last_pipe_crtc->hardware_pipe) + last_pipe_crtc = crtc; + + crtc_index_mask |= 1 << crtc->crtc_index; + } + + return crtc_index_mask; +} + static bool skip_plane(data_t *data, igt_plane_t *plane) { int index = plane->index; @@ -978,6 +999,8 @@ static void test_output(data_t *data, const int testnum) data->flags = tests[testnum].flags; + data->crtc_index_mask = get_crtc_index_mask(data); + for (int i = 0; i < ARRAY_SIZE(ccs_modifiers); i++) { if (!valid_modifier_test(ccs_modifiers[i].modifier, data->flags)) @@ -1016,6 +1039,9 @@ static void test_output(data_t *data, const int testnum) if (!intel_pipe_output_combo_valid(&data->display)) continue; + if (!(data->crtc_index_mask & (1 << crtc->crtc_index))) + continue; + igt_dynamic_f("pipe-%s-%s", igt_crtc_name(crtc), data->output->name) { int valid_tests = 0; @@ -1072,6 +1098,9 @@ static int opt_handler(int opt, int opt_index, void *opt_data) case 'n': data->all_outputs = true; break; + case 'e': + data->all_crtcs = true; + break; default: return IGT_OPT_HANDLER_ERROR; } @@ -1086,9 +1115,10 @@ static const char *help_str = " -s \tSeed for random number generator\n" " -r\t\tOn suspend test do full hibernate with reboot\n" " -n\t\tRun on all connectors. (By default suspend subtests will run on 3 connectors)\n" +" -e\t\tRun on all CRTCs. (By default subtests will run on two CRTCs)\n" ; -int igt_main_args("csrn:", NULL, help_str, opt_handler, &data) +int igt_main_args("cs:rne", NULL, help_str, opt_handler, &data) { igt_fixture() { data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE); -- 2.45.2