[PATCH i-g-t v3 1/4] tests/intel/kms_pm_dc: Update test_deep_pkgc_state function
Kandpal, Suraj
suraj.kandpal at intel.com
Mon Jul 29 06:40:17 UTC 2024
> -----Original Message-----
> From: Naladala, Ramanaidu <ramanaidu.naladala at intel.com>
> Sent: Friday, July 26, 2024 3:38 PM
> To: igt-dev at lists.freedesktop.org
> Cc: B, Jeevan <jeevan.b at intel.com>; Kandpal, Suraj
> <suraj.kandpal at intel.com>; Konieczny, Kamil <kamil.konieczny at intel.com>;
> Naladala, Ramanaidu <ramanaidu.naladala at intel.com>
> Subject: [PATCH i-g-t v3 1/4] tests/intel/kms_pm_dc: Update
> test_deep_pkgc_state function
>
> Enhanced the test_deep_pkgc_state function to includes the following
Should be
*function to include the following
> changes:
> - Removed the unused variable `vrr_supported` to clean up the code.
> - Added a check for the eDP connector to ensure proper connector
> handling.
> - Implemented a check to ensure frame time is not less than 5ms.
> - Added logic to disable VRR if VRR is enabled.
The logic should be that if vrr is enabled check if vmin = vmax = flipline if it is
No need to disable VRR if the above condition fails disable VRR
>
Please use imperatives to write the commit message and comments
For example instead of
Enhanced the test_deep_pkgc_state function to includes the following
It should be
Enhance the test_deep_pkgc_state function to include the following
Similarly change it for all commit messages and some comments that you have added in
code.
> v2: Correct indentation and update comments. (Suraj, Jeevan)
> v3: Update Commit subject/message. (Kamil)
>
> Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
> ---
> tests/intel/kms_pm_dc.c | 28 ++++++++++++++++++++--------
> 1 file changed, 20 insertions(+), 8 deletions(-)
>
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c index
> e1318bfa6..3d37d4a25 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -595,31 +595,43 @@ static void test_deep_pkgc_state(data_t *data)
> time_t start = time(NULL), duration = 2, delay;
> enum pipe pipe;
> bool pkgc_flag = false;
> - bool vrr_supported = false, flip = true;
> + bool flip = true;
>
> 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)) {
> - vrr_supported = true;
> + 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);
> break;
> }
> }
>
> - /* Skip the test if no VRR capable output is found */
> - if (!vrr_supported)
> - igt_skip("No VRR capable output found, skipping the
> test.\n");
> -
> igt_display_reset(display);
> -
> igt_output_set_pipe(output, pipe);
>
> + for_each_connector_mode(output) {
> + data->mode = &output->config.connector->modes[j__];
> + delay = 1 * (MSECS / (data->mode->vrefresh));
> + /*
> + * At least 5ms vblank time required to program higher
Should be *vblank time is required
Regards,
Suraj Kandpal
> + * watermark levels
> + */
> + if (delay >= (5 * MSECS))
> + break;
> + }
> +
> data->output = output;
> - data->mode = igt_output_get_mode(output);
> setup_videoplayback(data);
>
> primary = igt_output_get_plane_type(data->output,
> DRM_PLANE_TYPE_PRIMARY);
> --
> 2.43.0
More information about the igt-dev
mailing list