Re: [PATCH i-g-t] tests/intel/kms_dirtyfb: Pass output to PSR helpers

Hogander, Jouni
2026-03-18T14:10:04Z

On Wed, 2026-03-18 at 08:42 +0530, Jeevan B wrote:
> Replace NULL with data->output in PSR function calls and update the
> log to include the output name when PSR is not supported.
>
> This change ensures correct behavior in dual eDP setups where PSR
> support may differ between displays. Passing the specific output
> instead of NULL allows PSR checks to be performed per connector,
> ensuring each display is evaluated independently and accurately.
>
> v2: Replace NULL with data->output in all PSR helpers.
> v3: Update commit message.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

> ---
>  tests/intel/kms_dirtyfb.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tests/intel/kms_dirtyfb.c b/tests/intel/kms_dirtyfb.c
> index b85e09346..b5de63350 100644
> --- a/tests/intel/kms_dirtyfb.c
> +++ b/tests/intel/kms_dirtyfb.c
> @@ -120,8 +120,8 @@ static bool check_support(data_t *data)
>   return false;
>   }
>   if (!psr_sink_support(data->drm_fd, data-
> >debugfs_fd,
> -       PSR_MODE_1, NULL)) {
> - igt_info("Output doesn't support PSR\n");
> +       PSR_MODE_1, data->output)) {
> + igt_info("Output %s doesn't support PSR\n",
> igt_output_name(data->output));
>   return false;
>   }
>   return true;
> @@ -150,7 +150,7 @@ static void enable_feature(data_t *data)
>   intel_fbc_enable(&data->display);
>   break;
>   case FEATURE_PSR:
> - psr_enable(data->drm_fd, data->debugfs_fd,
> PSR_MODE_1, NULL);
> + psr_enable(data->drm_fd, data->debugfs_fd,
> PSR_MODE_1, data->output);
>   break;
>   case FEATURE_DRRS:
>   intel_drrs_enable(data->crtc);
> @@ -173,7 +173,7 @@ static void check_feature_enabled(data_t *data)
>   break;
>   case FEATURE_PSR:
>   igt_require(!psr_disabled_check(data->debugfs_fd));
> - igt_assert_f(psr_wait_entry(data->debugfs_fd,
> PSR_MODE_1, NULL),
> + igt_assert_f(psr_wait_entry(data->debugfs_fd,
> PSR_MODE_1, data->output),
>        "PSR still disabled\n");
>   break;
>   case FEATURE_DRRS:
> @@ -217,8 +217,8 @@ static void disable_features(data_t *data)
>  {
>   intel_fbc_disable(&data->display);
>
> - if (psr_sink_support(data->drm_fd, data->debugfs_fd,
> PSR_MODE_1, NULL))
> - psr_disable(data->drm_fd, data->debugfs_fd, NULL);
> + if (psr_sink_support(data->drm_fd, data->debugfs_fd,
> PSR_MODE_1, data->output))
> + psr_disable(data->drm_fd, data->debugfs_fd, data-
> >output);
>
>   intel_drrs_disable(data->crtc);
>  }