[PATCH i-g-t] tests/intel/kms_pm_dc: Ensure eDP detection before skipping test
B, Jeevan
jeevan.b at intel.com
Fri Feb 7 05:03:08 UTC 2025
> -----Original Message-----
> From: Samala, Pranay <pranay.samala at intel.com>
> Sent: Friday, February 7, 2025 10:05 AM
> To: B, Jeevan <jeevan.b at intel.com>; igt-dev at lists.freedesktop.org
> Cc: B, Jeevan <jeevan.b at intel.com>
> Subject: RE: [PATCH i-g-t] tests/intel/kms_pm_dc: Ensure eDP detection
> before skipping test
>
> Hi Jeevan,
>
> > -----Original Message-----
> > From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of
> > Jeevan B
> > Sent: Thursday, February 6, 2025 9:30 PM
> > To: igt-dev at lists.freedesktop.org
> > Cc: B, Jeevan <jeevan.b at intel.com>
> > Subject: [PATCH i-g-t] tests/intel/kms_pm_dc: Ensure eDP detection
> > before skipping test
> >
> > Ensure all outputs are checked before skipping the test, preventing
> > premature exits when an eDP is available later.
> >
> > Signed-off-by: Jeevan B <jeevan.b at intel.com>
> > ---
> > tests/intel/kms_pm_dc.c | 39 ++++++++++++++++++++++++---------------
> > 1 file changed, 24 insertions(+), 15 deletions(-)
> >
> > diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c index
> > 9551cc6b9..aaf057b68 100644
> > --- a/tests/intel/kms_pm_dc.c
> > +++ b/tests/intel/kms_pm_dc.c
> > @@ -640,30 +640,39 @@ static void test_deep_pkgc_state(data_t *data)
> > time_t delay;
> > enum pipe pipe;
> > bool pkgc_flag = false;
> > - bool flip = true;
> > + bool flip = true, edp_found = false;
> >
> > igt_display_t *display = &data->display;
> > igt_plane_t *primary;
> > igt_output_t *output = NULL;
> >
> > for_each_pipe_with_valid_output(display, pipe, output) {
> > - if (output->config.connector->connector_type !=
> > DRM_MODE_CONNECTOR_eDP)
> > - igt_skip("No eDP output found, skipping the test.\n");
> > - /* Check VRR capabilities before setting up */
> > - if (igt_output_has_prop(output,
> > IGT_CONNECTOR_VRR_CAPABLE) &&
> > - igt_output_get_prop(output,
> > IGT_CONNECTOR_VRR_CAPABLE)) {
> > - /*
> > - * TODO: Add check for vmin = vmax = flipline if VRR
> > enabled
> > - * when KMD allows for such capability.
> > - */
> > - igt_pipe_set_prop_value(display, pipe,
> > - IGT_CRTC_VRR_ENABLED,
> > false);
> > - igt_assert(igt_display_try_commit_atomic(display,
> > -
> > DRM_MODE_ATOMIC_ALLOW_MODESET,
> > - NULL) == 0);
> > + if (output->config.connector->connector_type ==
> > DRM_MODE_CONNECTOR_eDP) {
> > + edp_found = true;
> > break;
> > }
> > }
> > +
> > + igt_require_f(edp_found, "No eDP output found, skipping the
> > +test.\n");
> > +
> > + for_each_pipe_with_valid_output(display, pipe, output) {
> > + if (output->config.connector->connector_type ==
> > DRM_MODE_CONNECTOR_eDP) {
> > + /* Check VRR capabilities before setting up */
> > + if (igt_output_has_prop(output,
> > IGT_CONNECTOR_VRR_CAPABLE) &&
> > + igt_output_get_prop(output,
> > IGT_CONNECTOR_VRR_CAPABLE)) {
> > + /*
> > + * TODO: Add check for vmin = vmax = flipline
> if
> > VRR enabled
> > + * when KMD allows for such capability.
> > + */
> > + igt_pipe_set_prop_value(display, pipe,
> > +
> > IGT_CRTC_VRR_ENABLED, false);
> > +
> > igt_assert(igt_display_try_commit_atomic(display,
> > +
> > DRM_MODE_ATOMIC_ALLOW_MODESET,
>
> Line length is of 103 columns, exceeds 100 columns Apart from this code
This can't be fixed. As it will spoil the structure.
> LGTM.
>
> Regards,
> Pranay
> > +
> > NULL) == 0);
> > + break;
> > + }
> > + }
> > + }
> > igt_display_reset(display);
> >
> > igt_output_set_pipe(output, pipe);
> > --
> > 2.25.1
More information about the igt-dev
mailing list