public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Naladala, Ramanaidu" <Ramanaidu.naladala@intel.com>
To: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>,
	<igt-dev@lists.freedesktop.org>
Cc: <karthik.b.s@intel.com>, <arun.r.murthy@intel.com>
Subject: Re: [PATCH i-g-t v2 1/2] lib/igt_kms: Add lowclk and highclk modes
Date: Tue, 24 Mar 2026 14:48:24 +0530	[thread overview]
Message-ID: <e58d1344-fa87-4dfc-8a37-1964715030af@intel.com> (raw)
In-Reply-To: <20260317053038.51570-2-santhosh.reddy.guddati@intel.com>

Hi Santhosh,

Imho,  rewrite the git subject something like, "Add helpers to fetch 
lowest and highest pixel clock modes"

On 3/17/2026 11:00 AM, Santhosh Reddy Guddati wrote:
> Introduce functions to return low clock and high clock modes when
> connector supports multiple modes.This sorts connector modes by display
> clock rather than resolution.
>
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>
> ---
>   lib/igt_kms.c | 36 ++++++++++++++++++++++++++++++++++++
>   lib/igt_kms.h |  2 ++
>   2 files changed, 38 insertions(+)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 8c42909fc..2ba34b034 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -5198,6 +5198,42 @@ drmModeModeInfo *igt_output_get_lowres_mode(igt_output_t *output)
>   	return lowest_mode;
>   }
>   
> +/**
> + * igt_output_get_lowclk_mode:
> + * @output: Target output
> + *
> + * Returns: A #drmModeModeInfo struct representing the mode with the lowest
> + * pixel clock.
> + */
> +drmModeModeInfo *igt_output_get_lowclk_mode(igt_output_t *output)
> +{
> +	drmModeConnector *connector = output->config.connector;
> +
> +	igt_assert_f(connector->count_modes > 0, "No modes for %s\n", igt_output_name(output));
> +
> +	igt_sort_connector_modes(connector, sort_drm_modes_by_clk_asc);
> +
> +	return &connector->modes[0];
> +}
> +
> +/**
> + * igt_output_get_highclk_mode:
> + * @output: Target output
> + *
> + * Returns: A #drmModeModeInfo struct representing the mode with the highest
> + * pixel clock.
> + */
> +drmModeModeInfo *igt_output_get_highclk_mode(igt_output_t *output)
> +{
> +	drmModeConnector *connector = output->config.connector;
> +
> +	igt_assert_f(connector->count_modes > 0, "No modes for %s\n", igt_output_name(output));
> +
> +	igt_sort_connector_modes(connector, sort_drm_modes_by_clk_dsc);
> +
> +	return &connector->modes[0];
> +}
> +
>   /**
>    * igt_output_override_mode:
>    * @output: Output of which the mode will be overridden
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index b3def1e73..6c8e60f02 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -604,6 +604,8 @@ bool kmstest_mode_is_valid(const drmModeModeInfo *mode);
>   drmModeModeInfo *igt_output_get_mode(igt_output_t *output);
>   drmModeModeInfo *igt_output_get_highres_mode(igt_output_t *output);
>   drmModeModeInfo *igt_output_get_lowres_mode(igt_output_t *output);
> +drmModeModeInfo *igt_output_get_lowclk_mode(igt_output_t *output);
> +drmModeModeInfo *igt_output_get_highclk_mode(igt_output_t *output);
>   void igt_output_override_mode(igt_output_t *output, const drmModeModeInfo *mode);
>   int igt_output_preferred_vrefresh(igt_output_t *output);
>   void igt_output_set_crtc(igt_output_t *output, igt_crtc_t *crtc);

  reply	other threads:[~2026-03-24  9:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17  5:30 [PATCH i-g-t v2 0/2] Use lowest mode for crc subtest Santhosh Reddy Guddati
2026-03-17  5:30 ` [PATCH i-g-t v2 1/2] lib/igt_kms: Add lowclk and highclk modes Santhosh Reddy Guddati
2026-03-24  9:18   ` Naladala, Ramanaidu [this message]
2026-03-17  5:30 ` [PATCH i-g-t v2 2/2] tests/kms_async_flips: Use lowest mode for crc subtest Santhosh Reddy Guddati
2026-03-24  9:11   ` Naladala, Ramanaidu
2026-03-17 14:37 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-03-17 15:36 ` ✓ i915.CI.BAT: " Patchwork
2026-03-18 18:01 ` ✗ i915.CI.Full: failure " Patchwork
2026-03-18 23:01 ` ✗ Xe.CI.FULL: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2026-03-09  8:24 [PATCH i-g-t v1] tests/kms_async_flips: " Santhosh Reddy Guddati
2026-03-17  4:56 ` [PATCH i-g-t v2 1/2] lib/igt_kms: Add lowclk and highclk modes Santhosh Reddy Guddati

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=e58d1344-fa87-4dfc-8a37-1964715030af@intel.com \
    --to=ramanaidu.naladala@intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@intel.com \
    --cc=santhosh.reddy.guddati@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