From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Karthik B S <karthik.b.s@intel.com>, <igt-dev@lists.freedesktop.org>
Cc: <chaitanya.kumar.borah@intel.com>
Subject: Re: [PATCH i-g-t 2/2] lib/igt_kms: Add max uncompressed dotclock limit for non-joiner mode selection
Date: Wed, 25 Nov 2026 13:52:05 +0530 [thread overview]
Message-ID: <30c5d931-4e9e-42cd-95d9-8019f4ce56ba@intel.com> (raw)
In-Reply-To: <20261116091832.1312335-2-karthik.b.s@intel.com>
On 11/16/2026 2:48 PM, Karthik B S wrote:
> From display 30 the kernel limits the single pipe pixel rate without
> DSC to the maximum validated frequency, which is below the max dotclock
> derived from CDCLK and reported in debugfs (see
> intel_max_uncompressed_dotclock()). Above this limit an uncompressed
> mode can't be driven by a single pipe.
>
> intel_boundary_non_joiner_mode_found() only checks against the max
> dotclock, so on a sink without DSC support it can select a boundary
> mode which the kernel drives with joiner.
>
> Add intel_get_max_uncompressed_dotclock() mirroring the kernel limits
> and use it in intel_boundary_non_joiner_mode_found(), so that the
> selected boundary mode stays on a single pipe irrespective of DSC
> support in the sink.
>
> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
> ---
> lib/igt_kms.c | 33 +++++++++++++++++++++++++++++++--
> lib/igt_kms.h | 1 +
> 2 files changed, 32 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 915c6a8a2..b28647696 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -7207,6 +7207,32 @@ int igt_get_current_cdclk(int fd)
> return read_and_parse_cdclk_debugfs(fd, "Current CD clock frequency:");
> }
>
> +/**
> + * intel_get_max_uncompressed_dotclock:
> + * @drm_fd: drm file descriptor
> + * @max_dotclock: Max pixel clock frequency
> + *
> + * Get the maximum pixel clock a single pipe supports without DSC. This
> + * mirrors the kernel's intel_max_uncompressed_dotclock(): above this
> + * limit an uncompressed mode can't be driven by a single pipe, so only
> + * modes below it are guaranteed to use a single pipe irrespective of
> + * DSC support in the sink.
> + *
> + * Returns: The maximum uncompressed pixel clock for a single pipe.
> + */
> +int intel_get_max_uncompressed_dotclock(int drm_fd, int max_dotclock)
> +{
> + int dev_id = intel_get_drm_devid(drm_fd);
> + int limit = max_dotclock;
> +
> + if (IS_WILDCATLAKE(dev_id))
> + limit = 937500;
> + else if (intel_display_ver(dev_id) >= 30)
> + limit = 1350000;
> +
> + return min(max_dotclock, limit);
LGTM.
Not expecting with this series, but we should move intel specific
helpers in a separate lib sooner or later, IMO.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Regards,
Ankit
> +}
> +
> /**
> * intel_get_max_pipe_hdisplay:
> * @drm_fd: drm file descriptor
> @@ -7340,7 +7366,9 @@ bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector,
> * @mode: libdrm mode to be filled
> *
> * Check if connector supports a mode at the platform's maximum single-pipe
> - * hdisplay boundary.
> + * hdisplay boundary. The mode clock must be below the uncompressed single
> + * pipe limit, so that the kernel doesn't fall back to joiner when the sink
> + * doesn't support DSC.
> *
> * Returns: True if a valid non-joiner mode at the boundary is found,
> * false otherwise.
> @@ -7349,12 +7377,13 @@ bool intel_boundary_non_joiner_mode_found(int drm_fd, drmModeConnector *connecto
> int max_dotclock, drmModeModeInfo *mode)
> {
> int max_hdisplay = intel_get_max_pipe_hdisplay(drm_fd);
> + int max_clock = intel_get_max_uncompressed_dotclock(drm_fd, max_dotclock);
>
> for (int i = 0; i < connector->count_modes; i++) {
> drmModeModeInfo *current_mode = &connector->modes[i];
>
> if (current_mode->hdisplay == max_hdisplay &&
> - current_mode->clock < max_dotclock &&
> + current_mode->clock < max_clock &&
> !mode_needs_joiner_exception(drm_fd, current_mode)) {
> *mode = *current_mode;
> return true;
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index dfcb91e02..c0565479f 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -1381,6 +1381,7 @@ void igt_sort_connector_modes(drmModeConnector *connector,
> bool igt_max_bpc_constraint(igt_display_t *display, igt_crtc_t *crtc,
> igt_output_t *output, int bpc);
> int igt_get_max_dotclock(int fd);
> +int intel_get_max_uncompressed_dotclock(int drm_fd, int max_dotclock);
> int intel_get_max_pipe_hdisplay(int drm_fd);
> int igt_get_max_cdclk(int fd);
> int igt_get_current_cdclk(int fd);
next prev parent reply other threads:[~2026-11-25 8:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 9:18 [PATCH i-g-t 1/2] tests/kms_setmode: Fix previous crtc mode lookup in joiner check Karthik B S
2026-11-16 9:18 ` [PATCH i-g-t 2/2] lib/igt_kms: Add max uncompressed dotclock limit for non-joiner mode selection Karthik B S
2026-11-17 5:16 ` S, Sowmiya
2026-11-25 10:22 ` Karthik B S
2026-11-25 8:22 ` Nautiyal, Ankit K [this message]
2026-11-25 10:23 ` Karthik B S
2026-11-16 20:05 ` ✓ Xe.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_setmode: Fix previous crtc mode lookup in joiner check Patchwork
2026-11-17 7:09 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-11-18 15:49 ` [PATCH i-g-t 1/2] " B, Jeevan
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=30c5d931-4e9e-42cd-95d9-8019f4ce56ba@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=chaitanya.kumar.borah@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=karthik.b.s@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.