RE: [PATCH i-g-t 4/7] lib/igt_kms: Export get_max_pipe_hdisplay as intel_get_max_pipe_hdisplay

Kandpal, Suraj
2026-04-02T05:21:18Z

> Subject: [PATCH i-g-t 4/7] lib/igt_kms: Export get_max_pipe_hdisplay as
> intel_get_max_pipe_hdisplay
>
> Rename the static get_max_pipe_hdisplay() to the public

Nit : * to public

Otherwise LGTM,
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>

> intel_get_max_pipe_hdisplay() and export it from the header.
>
> v2: Use intel_ prefix (Jani)
>
> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
> ---
> lib/igt_kms.c | 8 ++++----
> lib/igt_kms.h | 1 +
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c index dbd419a9b..323446780 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -6907,12 +6907,12 @@ int igt_get_current_cdclk(int fd) }
>
> /**
> - * get_max_hdisplay:
> + * intel_get_max_pipe_hdisplay:
> * @drm_fd: drm file descriptor
> *
> * Returns: The maximum hdisplay supported per pipe.
> */
> -static int get_max_pipe_hdisplay(int drm_fd)
> +int intel_get_max_pipe_hdisplay(int drm_fd)
> {
> int dev_id = intel_get_drm_devid(drm_fd);
>
> @@ -6933,7 +6933,7 @@ static int get_max_pipe_hdisplay(int drm_fd)
> */
> bool igt_bigjoiner_possible(int drm_fd, drmModeModeInfo *mode, int
> max_dotclock) {
> - return (mode->hdisplay > get_max_pipe_hdisplay(drm_fd) ||
> + return (mode->hdisplay > intel_get_max_pipe_hdisplay(drm_fd) ||
> mode->clock > max_dotclock);
> }
>
> @@ -7047,7 +7047,7 @@ bool igt_is_joiner_enabled_for_pipe(int drmfd,
> enum pipe pipe)
> */
> bool igt_ultrajoiner_possible(int drm_fd, drmModeModeInfo *mode, int
> max_dotclock) {
> - return (mode->hdisplay > 2 * get_max_pipe_hdisplay(drm_fd) ||
> + return (mode->hdisplay > 2 * intel_get_max_pipe_hdisplay(drm_fd) ||
> mode->clock > 2 * max_dotclock);
> }
>
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h index f994d91d3..a9f02a10a 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -1236,6 +1236,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_pipe_hdisplay(int drm_fd);
> int igt_get_max_cdclk(int fd);
> int igt_get_current_cdclk(int fd);
> bool igt_bigjoiner_possible(int drm_fd, drmModeModeInfo *mode, int
> max_dotclock);
> --
> 2.25.1