Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Swati Sharma <swati2.sharma@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] tests/intel/kms_dsc: Sort modes by clock to pick highest bandwidth mode
Date: Thu, 14 May 2026 13:22:50 +0530	[thread overview]
Message-ID: <63f61029-9805-496e-bbff-316ffa754d7f@intel.com> (raw)
In-Reply-To: <20260513201224.2421654-1-swati2.sharma@intel.com>


On 5/14/2026 1:42 AM, Swati Sharma wrote:
> Replace igt_output_get_highres_mode() with sort_drm_modes_by_clk_dsc()
> to select the mode with the highest pixel clock. When multiple modes
> share the same resolution but differ in refresh rate, the resolution-based
> sort is ambiguous and may pick the wrong mode. Sorting by clock descending
> ensures the highest bandwidth mode is selected, which is most likely to
> trigger DSC.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>


> ---
>   tests/intel/kms_dsc.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/kms_dsc.c b/tests/intel/kms_dsc.c
> index 69f335da3..605ad2d5c 100644
> --- a/tests/intel/kms_dsc.c
> +++ b/tests/intel/kms_dsc.c
> @@ -170,7 +170,12 @@ static void update_display(data_t *data, uint32_t test_type)
>   	igt_skip_on(!igt_plane_has_format_mod(primary, data->plane_format,
>   		    DRM_FORMAT_MOD_LINEAR));
>   
> -	mode = igt_output_get_highres_mode(output);
> +	/* Sort modes by clock descending to pick the highest bandwidth mode,
> +	 * which is most likely to trigger DSC. This handles cases where
> +	 * multiple modes share the same resolution but differ in refresh rate.
> +	 */
> +	igt_sort_connector_modes(output->config.connector, sort_drm_modes_by_clk_dsc);
> +	mode = &output->config.connector->modes[0];
>   
>   	do {
>   		if (data->output_format != DSC_FORMAT_RGB && index > 0)

  parent reply	other threads:[~2026-05-14  7:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 20:12 [PATCH i-g-t] tests/intel/kms_dsc: Sort modes by clock to pick highest bandwidth mode Swati Sharma
2026-05-13 21:46 ` ✓ i915.CI.BAT: success for " Patchwork
2026-05-13 22:18 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-14  7:52 ` Nautiyal, Ankit K [this message]
2026-05-14 23:00 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-14 23:35 ` ✗ i915.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63f61029-9805-496e-bbff-316ffa754d7f@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=swati2.sharma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox