public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Joshi, Kunal1" <kunal1.joshi@intel.com>
To: "Jouni Högander" <jouni.hogander@intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [i-g-t,v2,2/3] tests/intel/kms_psr2_sf: Check pipe and output validity for Selective Fetch test
Date: Thu, 5 Feb 2026 11:33:38 +0530	[thread overview]
Message-ID: <1bb42632-93ee-4765-9453-6758d08a573a@intel.com> (raw)
In-Reply-To: <20260203061036.21482-3-jouni.hogander@intel.com>

Hello Jouni,

Please find comments inline,

On 03-02-2026 11:40, Jouni Högander wrote:
> There are some restrictions in pipe usage for PSR2/PR Selective
> Fetch. Implement helper to checks these restrictions and use it to figure
> out if pipe/PSR/PR combo in data_t is valid. Also check if used output
> supports PSR/PR.
>
> v2: rebase and commit message updated
>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
>   tests/intel/kms_psr2_sf.c | 134 ++++++++++++++++++++++----------------
>   1 file changed, 78 insertions(+), 56 deletions(-)
>
> diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
> index 0eae34cbd..776068104 100644
> --- a/tests/intel/kms_psr2_sf.c
> +++ b/tests/intel/kms_psr2_sf.c
> @@ -1084,18 +1084,37 @@ static bool check_pr_psr2_sel_fetch_support(data_t *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 &&
> +	    !IS_ALDERLAKE_S(intel_get_drm_devid(data->drm_fd)) && data->pipe != PIPE_A)
> +		return false;
> +
We already cache data->devid in the fixture can we reuse that here

With above
Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com>
> +	if (data->output->config.connector->connector_type == DRM_MODE_CONNECTOR_eDP &&
> +	    data->pipe != PIPE_A && data->pipe != PIPE_B)
> +		return false;
> +
> +	return true;
> +}
> +
>   static bool
> -pipe_output_combo_valid(igt_display_t *display,
> -			enum pipe pipe, igt_output_t *output)
> +pipe_output_combo_valid(data_t *data)
>   {
> -	bool ret = true;
> +	bool ret = psr_sink_support(data->drm_fd, data->debugfs_fd,
> +				    data->psr_mode, data->output);
> +	if (!ret)
> +		return ret;
> +
> +	ret = sel_fetch_pipe_combo_valid(data);
> +	if (!ret)
> +		return ret;
>   
> -	igt_display_reset(display);
> +	igt_display_reset(&data->display);
>   
> -	igt_output_set_crtc(output, igt_crtc_for_pipe(output->display, pipe));
> -	if (!intel_pipe_output_combo_valid(display))
> +	igt_output_set_crtc(data->output, igt_crtc_for_pipe(&data->display, data->pipe));
> +	if (!intel_pipe_output_combo_valid(&data->display))
>   		ret = false;
> -	igt_output_set_crtc(output, NULL);
> +	igt_output_set_crtc(data->output, NULL);
>   
>   	return ret;
>   }
> @@ -1265,11 +1284,12 @@ int igt_main()
>   						   append_psr_subtest[z],
>   						   op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i], outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					if (!pipe_output_combo_valid(&data))
> +						continue;
> +
>   					igt_assert_f(set_sel_fetch_mode_for_output(&data),
>   						     "Selective fetch is not supported\n");
>   
> @@ -1291,11 +1311,12 @@ int igt_main()
>   							   append_psr_subtest[z],
>   							   op_str(data.op)) {
>   					for (i = 0; i < n_pipes; i++) {
> -						if (!pipe_output_combo_valid(&data.display,
> -									     pipes[i], outputs[i]))
> -							continue;
>   						data.pipe = pipes[i];
>   						data.output = outputs[i];
> +
> +						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]))
> @@ -1316,12 +1337,12 @@ int igt_main()
>   						   append_psr_subtest[z],
>   						   op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))
> @@ -1338,12 +1359,12 @@ int igt_main()
>   			igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
>   						   append_psr_subtest[z], op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))
> @@ -1360,12 +1381,12 @@ int igt_main()
>   			igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
>   						   append_psr_subtest[z], op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))
> @@ -1382,12 +1403,12 @@ int igt_main()
>   			igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
>   						   append_psr_subtest[z], op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))
> @@ -1404,12 +1425,12 @@ int igt_main()
>   			igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
>   						   append_psr_subtest[z], op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))
> @@ -1427,12 +1448,12 @@ int igt_main()
>   			igt_subtest_with_dynamic_f("%s%s%s-sf-dmg-area", append_fbc_subtest[y],
>   						   append_psr_subtest[z], op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))
> @@ -1448,12 +1469,12 @@ int igt_main()
>   			igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
>   						   append_psr_subtest[z], op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))
> @@ -1470,12 +1491,12 @@ int igt_main()
>   			igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
>   						   append_psr_subtest[z], op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))
> @@ -1492,11 +1513,12 @@ int igt_main()
>   			igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
>   						   append_psr_subtest[z], op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display, pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))
> @@ -1514,12 +1536,12 @@ int igt_main()
>   			igt_subtest_with_dynamic_f("%s%s%s-sf-dmg-area", append_fbc_subtest[y],
>   						   append_psr_subtest[z], op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))
> @@ -1539,12 +1561,12 @@ int igt_main()
>   			igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
>   						   append_psr_subtest[z], op_str(data.op)) {
>   				for (i = 0; i < n_pipes; i++) {
> -					if (!pipe_output_combo_valid(&data.display,
> -								     pipes[i],
> -								     outputs[i]))
> -						continue;
>   					data.pipe = pipes[i];
>   					data.output = outputs[i];
> +
> +					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]))

  reply	other threads:[~2026-02-05  6:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03  6:10 [PATCH i-g-t v2 0/3] Run PSR2 and PR tests on panel supporting both Jouni Högander
2026-02-03  6:10 ` [PATCH i-g-t v2 1/3] tests/intel/kms_psr2_sf: Drop Early Transport flag from data_t Jouni Högander
2026-02-04 10:24   ` [i-g-t, v2, " Joshi, Kunal1
2026-02-03  6:10 ` [PATCH i-g-t v2 2/3] tests/intel/kms_psr2_sf: Check pipe and output validity for Selective Fetch test Jouni Högander
2026-02-05  6:03   ` Joshi, Kunal1 [this message]
2026-02-03  6:10 ` [PATCH i-g-t v2 3/3] tests/kms_psr2_sf: Allow testing of both PSR2 and Panel Replay if supported Jouni Högander
2026-02-05  6:11   ` [i-g-t, v2, " Joshi, Kunal1
2026-02-03  7:14 ` ✓ Xe.CI.BAT: success for Run PSR2 and PR tests on panel supporting both (rev2) Patchwork
2026-02-03  7:28 ` ✓ i915.CI.BAT: " Patchwork
2026-02-03 18:50 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-03 20:29 ` ✗ Xe.CI.FULL: " Patchwork

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=1bb42632-93ee-4765-9453-6758d08a573a@intel.com \
    --to=kunal1.joshi@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jouni.hogander@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