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

B, Jeevan
2026-03-18T06:16:39Z

> -----Original Message-----
> From: Samala, Pranay <pranay.samala@intel.com>
> Sent: Wednesday, March 18, 2026 10:48 AM
> To: B, Jeevan <jeevan.b@intel.com>; igt-dev@lists.freedesktop.org
> Cc: Hogander, Jouni <jouni.hogander@intel.com>; B, Jeevan
> <jeevan.b@intel.com>
> Subject: RE: [PATCH i-g-t] tests/intel/kms_dirtyfb: Pass output to PSR helpers
>
> Hi Jeevan,
>
> > -----Original Message-----
> > From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of
> > Jeevan B
> > Sent: Wednesday, March 18, 2026 8:42 AM
> > To: igt-dev@lists.freedesktop.org
> > Cc: Hogander, Jouni <jouni.hogander@intel.com>; B, Jeevan
> > <jeevan.b@intel.com>
> > Subject: [PATCH i-g-t] tests/intel/kms_dirtyfb: Pass output to PSR
> > helpers
> >
> > 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>
> > ---
> > 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);
>
> Passing data->output is clear for psr_sink_support() and psr_wait_entry()
> since those read output-specific PSR status.
> But for psr_enable() and psr_disable(), impact is limited today since current
> control paths are still global.
Even though psr_enable() and psr_disable() are effectively global today,
passing data->output keeps the interface consistent with other PSR helpers
and future-proofs the code in case per-output control is introduced later.

Thanks
Jeevan B
>
> Regards,
> Pranay
> >
> > intel_drrs_disable(data->crtc);
> > }
> > --
> > 2.43.0