From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"Kahola, Mika" <mika.kahola@intel.com>
Subject: Re: [PATCH i-g-t v2 2/3] tests/intel/kms_joiner: Add PSR2 selective fetch test with joiner
Date: Thu, 12 Nov 2026 08:17:22 +0000 [thread overview]
Message-ID: <2feeabfbd515aff27720e16186c8ca34879bb5c1.camel@intel.com> (raw)
In-Reply-To: <20261104130737.2549248-3-mika.kahola@intel.com>
On Wed, 2026-11-04 at 13:07 +0000, Mika Kahola wrote:
> Add basic-force-big-joiner-psr2-sel-fetch to check that PSR2
> selective fetch enters while forced into big joiner mode.
>
> PSR2 selective fetch only supports the PIPE_A|PIPE_B joiner pair, so
> restrict setup_pipe() to PIPE_A. Force enable_psr=2, since it can
> otherwise cap PSR at PSR1 regardless of the debugfs override. Retry
> psr_wait_entry(), since bigjoiner commits settle slower than
> single-pipe ones.
>
> v2: Skip the test if joiner is not supported on eDP.
Generally about this patch:
Every setup supporting psr2 will already run all existing joiner
testcases with psr2 enabled -> I don't see value adding this testcase?
>
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
> tests/intel/kms_joiner.c | 93
> ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 93 insertions(+)
>
> diff --git a/tests/intel/kms_joiner.c b/tests/intel/kms_joiner.c
> index 0a04f7ca8..8edec55d2 100644
> --- a/tests/intel/kms_joiner.c
> +++ b/tests/intel/kms_joiner.c
> @@ -33,6 +33,7 @@
> */
>
> #include "igt.h"
> +#include "igt_psr.h"
> #include "kms_dsc_helper.c"
> #include "kms_joiner_helper.h"
>
> @@ -61,6 +62,10 @@
> * Force joiner applies bigjoiner functionality to non-
> bigjoiner outputs thus,
> * the test exclusively targets non-bigjoiner outputs.
> *
> + * SUBTEST: basic-force-big-joiner-psr2-sel-fetch
> + * Description: Verify PSR2 selective fetch can be entered while the
> output is
> + * driven in force big joiner mode.
> + *
> * SUBTEST: basic-force-ultra-joiner
> * Description: Verify basic ultra joiner modeset in force joiner
> mode across all pipes.
> * Force joiner applies bigjoiner functionality to non-
> bigjoiner outputs thus,
> @@ -83,6 +88,7 @@ IGT_TEST_DESCRIPTION("Test joiner / force joiner");
>
> typedef struct {
> int drm_fd;
> + int debugfs_fd;
> int big_joiner_output_count;
> int ultra_joiner_output_count;
> int non_big_joiner_output_count;
> @@ -217,6 +223,22 @@ static void require_big_joiner(data_t *data,
> enum force_joiner_mode mode)
> "No big joiner output found\n");
> }
>
> +/* Returns a force joiner capable output supporting PSR2 selective
> fetch, or NULL. */
> +static igt_output_t *get_psr2_sel_fetch_output(data_t *data)
> +{
> + igt_output_t *output;
> + int i;
> +
> + for (i = 0; i < data->non_big_joiner_output_count; i++) {
> + output = data->non_big_joiner_output[i];
> + if (psr_sink_support(data->drm_fd, data->debugfs_fd,
> + PSR_MODE_2_SEL_FETCH, output))
> + return output;
> + }
> +
> + return NULL;
> +}
> +
> static void switch_modeset_ultra_joiner_big_joiner(data_t *data,
> igt_output_t *output)
> {
> drmModeModeInfo bj_mode;
> @@ -307,6 +329,56 @@ static void test_single_joiner(data_t *data,
> igt_output_t **outputs, int output_
> }
> }
>
> +static void test_joiner_psr2_sel_fetch(data_t *data, igt_output_t
> *output)
> +{
> + uint32_t available_pipe_mask = BIT(data->n_pipes) - 1;
> + enum hardware_pipe master_pipe;
> + igt_plane_t *primary;
> + igt_fb_t fb;
> + drmModeModeInfo *mode;
> + bool entered = false, joiner_active;
> + int retry;
> +
> + /* enable_psr=1 (force PSR1) silently fails
> intel_psr2_config_valid(), overriding debugfs. */
> + igt_set_module_param_int(data->drm_fd, "enable_psr", 2);
Usually there is some reason to have enable_psr set. I don't think
testcase should change it.
BR,
Jouni Högander
> +
> + igt_display_reset(&data->display);
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +
> + /* Arm PSR2 selective fetch before the joiner modeset so it
> applies to the next commit. */
> + igt_require_f(psr_enable(data->drm_fd, data->debugfs_fd,
> PSR_MODE_2_SEL_FETCH, output),
> + "Failed to enable PSR2 selective fetch on
> %s\n", output->name);
> +
> + /* psr_joiner_config_valid() only allows the joiner pipe
> mask to be PIPE_A|PIPE_B. */
> + master_pipe = setup_pipe(data, output, PIPE_A,
> available_pipe_mask);
> + igt_require_f(master_pipe == PIPE_A,
> + "No PIPE_A/B joiner pairing available for
> %s\n", output->name);
> +
> + mode = igt_output_get_mode(output);
> + primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> + igt_create_pattern_fb(data->drm_fd, mode->hdisplay, mode-
> >vdisplay, DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_MOD_LINEAR, &fb);
> + igt_plane_set_fb(primary, &fb);
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
> +
> + joiner_active = igt_is_joiner_enabled_for_pipe(data->drm_fd,
> master_pipe);
> +
> + if (joiner_active) {
> + /* Bigjoiner commits settle slower than single-pipe
> ones, so retry past the 500ms default. */
> + for (retry = 0; retry < 4 && !entered; retry++)
> + entered = psr_wait_entry(data->debugfs_fd,
> PSR_MODE_2_SEL_FETCH, output);
> + }
> +
> + psr_disable(data->drm_fd, data->debugfs_fd, output);
> + igt_display_reset(&data->display);
> + igt_plane_set_fb(primary, NULL);
> + igt_remove_fb(data->drm_fd, &fb);
> +
> + igt_require_f(joiner_active, "Joiner not enabled on %s\n",
> output->name);
> + igt_assert_f(entered,
> + "PSR2 selective fetch did not enter with joiner
> active on %s\n", output->name);
> +}
> +
> static void test_multi_joiner(data_t *data, int output_count, bool
> force_joiner)
> {
> int i, cleanup;
> @@ -641,6 +713,7 @@ int igt_main()
> j = 0;
>
> data.drm_fd = drm_open_driver_master(DRIVER_INTEL |
> DRIVER_XE);
> + data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
> kmstest_set_vt_graphics_mode();
> igt_display_require(&data.display, data.drm_fd);
> igt_set_all_master_pipes_for_platform(&data.display,
> &data.master_pipes);
> @@ -764,6 +837,25 @@ int igt_main()
> }
> }
>
> + igt_describe("Verify PSR2 selective fetch can be entered
> while the output "
> + "is driven in force big joiner mode");
> + igt_subtest_with_dynamic("basic-force-big-joiner-psr2-sel-
> fetch") {
> + igt_output_t *psr_output;
> +
> + require_big_joiner(&data, FORCE_JOINER_ENABLE);
> +
> + psr_output = get_psr2_sel_fetch_output(&data);
> + igt_require_f(psr_output, "No output supporting PSR2
> selective fetch found\n");
> +
> + igt_dynamic_f("pipe-%s", psr_output->name) {
> + bool status =
> kmstest_force_connector_joiner(data.drm_fd, psr_output-
> >config.connector,
> +
> JOINED_PIPES_BIG_JOINER);
> + igt_assert_f(status, "Failed to toggle force
> joiner on %s\n", psr_output->name);
> + test_joiner_psr2_sel_fetch(&data,
> psr_output);
> + igt_reset_connectors();
> + }
> + }
> +
> igt_subtest_with_dynamic("invalid-modeset-force-big-joiner")
> {
> require_big_joiner(&data, FORCE_JOINER_ENABLE);
> if (data.non_big_joiner_output_count >= 1) {
> @@ -836,6 +928,7 @@ int igt_main()
>
> igt_fixture() {
> igt_display_fini(&data.display);
> + close(data.debugfs_fd);
> drm_close_driver(data.drm_fd);
> igt_reset_connectors();
> }
next prev parent reply other threads:[~2026-11-12 8:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 13:07 [PATCH i-g-t v2 0/3] tests/intel: validate PSR2 selective fetch under joiner Mika Kahola
2026-11-04 13:07 ` [PATCH i-g-t v2 1/3] tests/intel/kms_joiner: Pass output array into test_single_joiner() Mika Kahola
2026-11-04 13:07 ` [PATCH i-g-t v2 2/3] tests/intel/kms_joiner: Add PSR2 selective fetch test with joiner Mika Kahola
2026-11-12 8:17 ` Hogander, Jouni [this message]
2026-11-04 13:07 ` [PATCH i-g-t v2 3/3] tests/intel/kms_psr2_sf: Handle the joiner Mika Kahola
2026-11-12 8:19 ` Hogander, Jouni
2026-11-04 15:41 ` ✓ Xe.CI.BAT: success for tests/intel: validate PSR2 selective fetch under joiner (rev4) Patchwork
2026-11-04 15:49 ` ✗ i915.CI.BAT: failure " Patchwork
2026-11-05 6:16 ` ✗ Xe.CI.FULL: " Patchwork
2026-11-12 8:21 ` [PATCH i-g-t v2 0/3] tests/intel: validate PSR2 selective fetch under joiner Hogander, Jouni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2feeabfbd515aff27720e16186c8ca34879bb5c1.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=mika.kahola@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox