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 E2CBFE73164 for ; Mon, 2 Feb 2026 13:16:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9011510E2B0; Mon, 2 Feb 2026 13:16:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="LJLEoqqR"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id EAB3F10E2B4 for ; Mon, 2 Feb 2026 13:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770038210; x=1801574210; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6Me8uiXUr88K9WQcj5kQrItP1BHpL334VmEm3PDtQO8=; b=LJLEoqqRzklib8dIRLz8pb7Z7qbJi1oCMRVtRYSkWXVDpyVtx56628H0 FUL2a6EBV05xz41lRcbupw9qG4mwx4BzbC+dvXE4c6gZCh41Wfy6Z9lCF +yVeZNKFToP7ru1BoWoHMLM0MoezZw3jBo5E+xCtXk/QUCRtbEaQTHjvc XmBMR12ZUvaodU4q9wR42rS5O5ljqeSIK7BYvKTU61kgVLAGxbNU//NBb GCgeTEWUtkhiRAid8RlXAwAzcbNg6eLjWplqMl//7VNlh+CbzA3Gm/wbK pT49O6Q6iHpE2Ud9ikzxrMq8bgBqfCKna1M7/1Ul3TjQqGlH0APsIXfmN Q==; X-CSE-ConnectionGUID: 6vkvN/fkTdC2NTYr+6jGIg== X-CSE-MsgGUID: Mmv0ZtzNT+qDayeE1Krn0w== X-IronPort-AV: E=McAfee;i="6800,10657,11689"; a="75044388" X-IronPort-AV: E=Sophos;i="6.21,268,1763452800"; d="scan'208";a="75044388" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2026 05:16:50 -0800 X-CSE-ConnectionGUID: LIe01o9dSky2yKjeftjIIA== X-CSE-MsgGUID: dFbH6xhQQACnvGZ2wamYHQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,268,1763452800"; d="scan'208";a="214050808" Received: from aotchere-mobl1.ger.corp.intel.com (HELO jhogande-mobl3.intel.com) ([10.245.246.132]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2026 05:16:49 -0800 From: =?UTF-8?q?Jouni=20H=C3=B6gander?= To: igt-dev@lists.freedesktop.org Cc: =?UTF-8?q?Jouni=20H=C3=B6gander?= Subject: [PATCH i-g-t 3/3] tests/kms_psr2_sf: Allow testing of both PSR2 and Panel Replay if supported Date: Mon, 2 Feb 2026 15:16:22 +0200 Message-ID: <20260202131622.1369539-4-jouni.hogander@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260202131622.1369539-1-jouni.hogander@intel.com> References: <20260202131622.1369539-1-jouni.hogander@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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" Currently kms_psr2_sf is testing only Panel Replay even if PSR2 is supported. Allow testing both PSR2 and Panel Replay when supported. Also drop some complexity from fixture for detection of working PSR. Earlier working PSR support was detected in fixture by enabling PSR and then ensuring PSR entry happens. Now we are relying on pipe_output_combo_valid. Earlier approach was problematic as PSR Might be broken due to some earlier test which was run. This caused kms_psr2_sf to not run any tests on that sink/pipe setup. Now these are supposed to be visible as failing testcases. Signed-off-by: Jouni Högander --- tests/intel/kms_psr2_sf.c | 153 +++++--------------------------------- 1 file changed, 20 insertions(+), 133 deletions(-) diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c index c004d58b9..2ae1393c3 100644 --- a/tests/intel/kms_psr2_sf.c +++ b/tests/intel/kms_psr2_sf.c @@ -251,36 +251,6 @@ static bool is_et_check_needed(data_t *data) } } -static bool set_sel_fetch_mode_for_output(data_t *data) -{ - bool supported = false; - - if (psr_sink_support(data->drm_fd, data->debugfs_fd, - PR_MODE_SEL_FETCH_ET, data->output)) { - supported = true; - data->psr_mode = PR_MODE_SEL_FETCH; - } else if (psr_sink_support(data->drm_fd, data->debugfs_fd, - PR_MODE_SEL_FETCH, data->output)) { - supported = true; - data->psr_mode = PR_MODE_SEL_FETCH; - } else if (psr_sink_support(data->drm_fd, data->debugfs_fd, - PSR_MODE_2_ET, data->output)) { - supported = true; - data->psr_mode = PSR_MODE_2; - } else if (psr_sink_support(data->drm_fd, data->debugfs_fd, - PSR_MODE_2, data->output)) { - supported = true; - data->psr_mode = PSR_MODE_2; - } else - igt_info("selective fetch not supported on output %s\n", data->output->name); - - if (supported) - supported = psr_enable(data->drm_fd, data->debugfs_fd, data->psr_mode, - data->output); - - return supported; -} - static const char *op_str(enum operations op) { static const char * const name[] = { @@ -429,6 +399,9 @@ static void prepare(data_t *data) igt_plane_t *primary, *sprite = NULL, *cursor = NULL; int fb_w, fb_h, x, y, view_w, view_h; + psr_enable(data->drm_fd, data->debugfs_fd, data->psr_mode, + data->output); + data->mode = igt_output_get_mode(output); if (data->coexist_feature & FEATURE_DSC) { @@ -1065,25 +1038,6 @@ static void cleanup(data_t *data) igt_remove_fb(data->drm_fd, &data->fb_test); } -static bool check_pr_psr2_sel_fetch_support(data_t *data) -{ - bool status = false; - - /* Check sink supports PR/PSR2 selective fetch */ - if (!set_sel_fetch_mode_for_output(data)) - return false; - - /* Check if selective fetch can be enabled */ - if (!selective_fetch_check(data->debugfs_fd, data->output)) - igt_assert("Selective fetch is not enabled even though panel should support it\n"); - - prepare(data); - /* We enter into DEEP_SLEEP for both PSR2 and PR sel fetch */ - status = psr_wait_entry(data->debugfs_fd, data->psr_mode, data->output); - cleanup(data); - return status; -} - static bool sel_fetch_pipe_combo_valid(data_t *data) { if (intel_display_ver(intel_get_drm_devid(data->drm_fd)) < 14 && @@ -1119,14 +1073,6 @@ pipe_output_combo_valid(data_t *data) return ret; } -static bool check_psr_mode_supported(data_t *data, int psr_stat) -{ - if (data->psr_mode == psr_stat) - return true; - else - return false; -} - static void run_dynamic_test_damage_areas(data_t data, int i, int coexist_features[]) { for (int j = FEATURE_NONE; j < FEATURE_COUNT; j++) { @@ -1247,18 +1193,25 @@ igt_main data.big_fb_width, data.big_fb_height); for_each_pipe_with_valid_output(&data.display, data.pipe, data.output) { - coexist_features[n_pipes] = 0; - output_supports_pr_psr2_sel_fetch = check_pr_psr2_sel_fetch_support(&data); - if (output_supports_pr_psr2_sel_fetch) { - pipes[n_pipes] = data.pipe; - outputs[n_pipes] = data.output; + for (i = 0; i < ARRAY_SIZE(psr_status); i++) { + data.psr_mode = psr_status[i]; + output_supports_pr_psr2_sel_fetch = pipe_output_combo_valid(&data); + if (output_supports_pr_psr2_sel_fetch) + break; + } - if (is_dsc_supported_by_sink(data.drm_fd, data.output)) - coexist_features[n_pipes] |= FEATURE_DSC; + if (!output_supports_pr_psr2_sel_fetch) + continue; - n_pipes++; - } - pr_psr2_sel_fetch_supported |= output_supports_pr_psr2_sel_fetch; + pipes[n_pipes] = data.pipe; + outputs[n_pipes] = data.output; + + coexist_features[n_pipes] = 0; + if (is_dsc_supported_by_sink(data.drm_fd, data.output)) + coexist_features[n_pipes] |= FEATURE_DSC; + + n_pipes++; + pr_psr2_sel_fetch_supported = true; } igt_require_f(pr_psr2_sel_fetch_supported, "No output supports selective fetch\n"); @@ -1289,12 +1242,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_PRIMARY; run_dynamic_test_damage_areas(data, i, coexist_features); } @@ -1316,11 +1263,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_PRIMARY; run_dynamic_test_damage_areas(data, i, coexist_features); @@ -1342,11 +1284,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_OVERLAY; run_dynamic_test_damage_areas(data, i, coexist_features); } @@ -1364,11 +1301,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_CURSOR; run_dynamic_test(data, i, coexist_features); } @@ -1386,11 +1318,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_CURSOR; run_dynamic_test(data, i, coexist_features); } @@ -1408,11 +1335,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_CURSOR; run_dynamic_test(data, i, coexist_features); } @@ -1430,11 +1352,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_CURSOR; run_dynamic_test(data, i, coexist_features); } @@ -1453,11 +1370,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - run_plane_move(data, i, coexist_features); } } @@ -1474,11 +1386,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_OVERLAY; run_dynamic_test(data, i, coexist_features); } @@ -1496,11 +1403,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_OVERLAY; run_dynamic_test(data, i, coexist_features); } @@ -1518,11 +1420,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_OVERLAY; run_dynamic_test(data, i, coexist_features); } @@ -1541,11 +1438,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - data.test_plane_id = DRM_PLANE_TYPE_PRIMARY; run_dynamic_test_damage_areas(data, i, coexist_features); } @@ -1566,11 +1458,6 @@ igt_main if (!pipe_output_combo_valid(&data)) continue; - igt_assert_f(set_sel_fetch_mode_for_output(&data), - "Selective fetch is not supported\n"); - if (!check_psr_mode_supported(&data, psr_status[z])) - continue; - run_plane_update_continuous(data, i, coexist_features); } } -- 2.43.0