[PATCH i-g-t v5 2/4] tests/intel/kms_pm_dc: Update VRR handling and eDP output check
Kandpal, Suraj
suraj.kandpal at intel.com
Wed Aug 28 05:56:46 UTC 2024
> -----Original Message-----
> From: Naladala, Ramanaidu <ramanaidu.naladala at intel.com>
> Sent: Tuesday, August 27, 2024 6:10 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Kandpal, Suraj <suraj.kandpal at intel.com>; B, Jeevan
> <jeevan.b at intel.com>; Naladala, Ramanaidu
> <ramanaidu.naladala at intel.com>
> Subject: [PATCH i-g-t v5 2/4] tests/intel/kms_pm_dc: Update VRR handling and
> eDP output check
>
> It should be enhance the test_deep_pkgc_state function to include the
> following changes:
The above sentence makes no sense please reframe the sentence
> - Remove the unused variable `vrr_supported` to clean up the code.
> - Add a check for the eDP connector to ensure proper connector handling.
> - Update VRR handling to disable VRR and commit atomic changes.
> - Modify the delay calculation for connector modes to ensure proper
> vblank time.
> - Remove redundant VRR capability check and skip logic.
>
> v2: Correct indentation and update comments. (Suraj, Jeevan)
> v3: Update Commit subject/message. (Kamil)
> v4: Update commit subject/message. (Suraj)
> v5: Update commit subject/message. (Suraj)
>
> Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
> Reviewed-by: Suraj Kandpal <suraj.kandpal at intel.com>
> ---
> tests/intel/kms_pm_dc.c | 32 +++++++++++++++++++++++---------
> 1 file changed, 23 insertions(+), 9 deletions(-)
>
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c index
> 2ae9fd2a5..b9bee3523 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -596,36 +596,50 @@ 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;
> + /*
> + * TODO: Add check for vmin = vmax = flipline if VRR
> enabled.
> + * KMD patches still under review. Need to wait till
> KMD
> + * patches merge.
This is not the correct TODO message to add
Should be something like
Add check for vmin = vmax = flipline if VRR enabled when KMD allows for such capability
Regards,
Suraj Kandpal
> + */
> + 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 */
> - igt_skip_on_f(!vrr_supported,
> - "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 = (MSEC / (data->mode->vrefresh));
> + /*
> + * Should be 5ms vblank time required to program higher
> + * watermark levels
> + */
> + if (delay >= (5 * MSEC))
> + 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);
> pre_val = read_pkgc_counter(data->debugfs_root_fd);
> - delay = (MSEC / (data->mode->vrefresh - 10));
>
> igt_plane_set_fb(primary, &data->fb_rgb);
> igt_display_commit(&data->display);
> --
> 2.43.0
More information about the igt-dev
mailing list