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 02D39CE8D66 for ; Fri, 14 Nov 2025 17:22:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A782A10EAE8; Fri, 14 Nov 2025 17:22:43 +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="YnI8Wvmb"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F9C310EAD9 for ; Fri, 14 Nov 2025 17:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1763140962; x=1794676962; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2LQVWHCnhspy5Q5JDeDTT4KX8EUI2vJs0xcjPJVE8vM=; b=YnI8WvmbwGC5RnfCzCDKre+7UZlJJB/6M84NCJemYzQEVuxGKkLtx1fs +iv+UcP71iV5CBdtvJEb8n7y/K1LImCGXRExotvv1curxFSxgdaxDGHMo 6phgH3rXojblUB34bX39DlB078HM5Gw79OA+bW1wskdsB8/rz26RALZQU co5nBDn0s0JPa+PhbYW0iT53dqve0EW0HUNAoNL8aLnplSg15g9ANV/69 i6xnNNXGG1B4gR+uVvkyPDVlp8ZAlhZkTk/QLaEQG5U4HHnu2npn4/+ok nD6eamz6VMqb2cXZPPg1GhL9IqKd+MyT6ECcKUDNRGUiU2z5Lr6JjXFeI A==; X-CSE-ConnectionGUID: JtA7tNHATbCjlys5bcMZqQ== X-CSE-MsgGUID: usGobLZpQzC1JMQ+dt/P4Q== X-IronPort-AV: E=McAfee;i="6800,10657,11613"; a="82871447" X-IronPort-AV: E=Sophos;i="6.19,305,1754982000"; d="scan'208";a="82871447" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2025 09:22:42 -0800 X-CSE-ConnectionGUID: kpjM8ex3S8W6wpvQGgPBzQ== X-CSE-MsgGUID: JBEoKAqqTD+h0npddn0TGw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,305,1754982000"; d="scan'208";a="194981468" Received: from linux-x299-aorus-gaming-3-pro.iind.intel.com ([10.223.34.115]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2025 09:22:40 -0800 From: Swati Sharma To: igt-dev@lists.freedesktop.org Cc: uma.shankar@intel.com, chaitanya.kumar.borah@intel.com, Swati Sharma Subject: [PATCH i-g-t, v4 10/23] tests/kms_color: Add helper for plane color pipeline tests Date: Fri, 14 Nov 2025 22:58:55 +0530 Message-Id: <20251114172908.1027816-11-swati2.sharma@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20251114172908.1027816-1-swati2.sharma@intel.com> References: <20251114172908.1027816-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 a helper to run plane color pipeline tests across all pipes and outputs. Signed-off-by: Swati Sharma --- tests/kms_color.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/kms_color.c b/tests/kms_color.c index 576fd5329..a47c71f33 100644 --- a/tests/kms_color.c +++ b/tests/kms_color.c @@ -891,6 +891,10 @@ static void test_setup(data_t *data, enum pipe p) data->primary->pipe->pipe, IGT_PIPE_CRC_SOURCE_AUTO); + igt_display_require_output_on_pipe(&data->display, p); + data->output = igt_get_single_output_for_pipe(&data->display, p); + igt_require(data->output); + igt_display_reset(&data->display); } @@ -984,6 +988,40 @@ run_ctm_tests_for_pipe(data_t *data, enum pipe p, test_cleanup(data); } +__maybe_unused +static void run_plane_color_tests(data_t *data, + const color_t *fb_colors, + const color_t *exp_colors, + kms_colorop_t *colorops[]) +{ + enum pipe pipe; + + data->color_depth = 8; + data->drm_format = DRM_FORMAT_XRGB8888; + + for_each_pipe(&data->display, pipe) { + test_setup(data, pipe); + + data->mode = igt_output_get_mode(data->output); + + if (!pipe_output_combo_valid(data, pipe)){ + test_cleanup(data); + continue; + } + + /* TODO: extend the test to multiple planes (HDR & SDR) */ + if (!igt_plane_has_prop(data->primary, IGT_PLANE_COLOR_PIPELINE)) + continue; + + igt_dynamic_f("pipe-%s-%s", + kmstest_pipe_name(pipe), + igt_output_name(data->output)) + igt_assert(test_plane_colorops(data, fb_colors, exp_colors, colorops)); + } + + test_cleanup(data); +} + static void run_deep_color_tests_for_pipe(data_t *data, enum pipe p) { -- 2.25.1