Re: [PATCH i-g-t v1 1/2] lib/igt_kms: Add platform-specific joiner exception mode handling

"Reddy Guddati, Santhosh" <[email protected]> Fri, 24 Jul 2026 12:07:29 +0530
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <[email protected]>
Hi Sowmiya,

On 23-07-2026 19:13, Sowmiya S wrote:
> On NVL (display_ver=35), a higher max_dotclock causes modes like
> 6144x3456@60 to pass the standard igt_bigjoiner_possible() checks,
> yet the kernel still enables joiner for them. Introduce per-platform
> exception mode lists (e.g. nvl_joiner_exception_modes[]) dispatched
> via IS_NOVALAKE() in a new mode_needs_joiner_exception() helper, and
> wire it into igt_bigjoiner_possible(). Also add IS_NOVALAKE() to
> intel_chipset.h as a combined IS_NOVALAKE_S() || IS_NOVALAKE_P() macro.

As there are no changes to chipset.h, please remove this.

> 
> Signed-off-by: Sowmiya S <[email protected]>
> ---
>   lib/igt_kms.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--
>   1 file changed, 50 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 2eefb773b..bfa6dfc0e 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -7058,6 +7058,52 @@ int intel_get_max_pipe_hdisplay(int drm_fd)
>   						   HDISPLAY_5K_PER_PIPE;
>   }
>   
> +struct joiner_mode_exception {
> +	uint16_t hdisplay, vdisplay;
> +	uint32_t clock;
> +};
> +
> +static bool match_joiner_exception(drmModeModeInfo *mode,
> +				   const struct joiner_mode_exception *list,
> +				   int count)
> +{
> +	for (int i = 0; i < count; i++) {
> +		if (mode->hdisplay == list[i].hdisplay &&
> +		    mode->vdisplay == list[i].vdisplay &&
> +		    mode->clock == list[i].clock)
> +			return true;
> +	}
> +
> +	return false;
> +}
> +
> +/* NVL: higher max_dotclock allows clocks that still need joiner */
> +static const struct joiner_mode_exception nvl_joiner_exception_modes[] = {
> +	{ 6144, 3456, 1413390 }, /* 6144x3456@60Hz */
> +};

Add a #TODO,

IGT cannot compute the DSC bubble overhead the driver adds to the
effective pixel rate, since it cannot estimate the DSC parameters -
whether DSC is used and how many slices. On NVL this lets modes like
6144x3456@60 pass igt_bigjoiner_possible()'s clock/hdisplay checks,
yet the kernel still enables bigjoiner for them

Add mode_needs_joiner_exception() as a stopgap.

++ Ankit> +
> +/*
> + * mode_needs_joiner_exception - check if a mode requires joiner via explicit exception
> + * @drm_fd: drm file descriptor
> + * @mode: libdrm mode
> + *
> + * On some platforms, a higher max_dotclock means certain modes won't trigger
> + * the standard clock or hdisplay checks even though the kernel enables joiner
> + * for them. Each platform has its own exception list.
> + *
> + * Returns: True if the mode is a known joiner exception, else False.
> + */
> +static bool mode_needs_joiner_exception(int drm_fd, drmModeModeInfo *mode)
> +{
> +	uint16_t dev_id = intel_get_drm_devid(drm_fd);
> +
> +	if (IS_NOVALAKE_P(dev_id) || IS_NOVALAKE_S(dev_id))

Consider to use display version instead of these macros?

> +		return match_joiner_exception(mode, nvl_joiner_exception_modes,
> +					      ARRAY_SIZE(nvl_joiner_exception_modes));
> +
> +	return false;
> +}
> +
>   /**
>    * igt_bigjoiner_possible:
>    * @drm_fd: drm file descriptor
> @@ -7066,13 +7112,15 @@ int intel_get_max_pipe_hdisplay(int drm_fd)
>    *
>    * Bigjoiner is required when the requested mode exceeds single-pipe
>    * platform limits, i.e. hdisplay is above the platform threshold or
> - * clock is above @max_dotclock.
> + * clock is above @max_dotclock. On NVL, the higher max_dotclock means
> + * some modes (e.g. 6144x3456@60) need an explicit exception check.

This is to be added as a FIXME instead of here and above 
mode_needs_joiner_exception(drm_fd, mode).

Thanks,
Santhosh
>    *
>    * Returns: True if mode requires Bigjoiner, else False.
>    */
>   bool igt_bigjoiner_possible(int drm_fd, drmModeModeInfo *mode, int max_dotclock)
>   {
> -	return (mode->hdisplay > intel_get_max_pipe_hdisplay(drm_fd) ||
> +	return (mode_needs_joiner_exception(drm_fd, mode) ||
> +		mode->hdisplay > intel_get_max_pipe_hdisplay(drm_fd) ||
>   		mode->clock > max_dotclock);
>   }
>