From: Karthik B S <karthik.b.s@intel.com>
To: Jeevan B <jeevan.b@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 2/3] lib/igt_kms: Add support to check joiner mode limit
Date: Wed, 12 Feb 2025 16:16:42 +0530 [thread overview]
Message-ID: <ecf830a1-3cbf-480d-8ed7-1e2030f1bf35@intel.com> (raw)
In-Reply-To: <20250212073604.1580120-3-jeevan.b@intel.com>
Hi,
On 2/12/2025 1:06 PM, Jeevan B wrote:
> Added library changes to find the highest non-joiner mode.
> This helps to get the mode that does not require a big joiner.
The second sentence seems redundant and could be removed. Also please
fix the commit subject.
>
> v2: Update commit message, create a new library function
> to get max hdisplay and fix condtion for selecting mode.
> v3: Update function name.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
> lib/igt_kms.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
> lib/igt_kms.h | 2 ++
> 2 files changed, 47 insertions(+)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 3caba7d77..e1a74a3ee 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -6406,6 +6406,51 @@ bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector,
> return found;
> }
>
> +/**
> + * get_max_hdisplay:
> + * @drm_fd: drm file descriptor
> + *
> + * Returns: The maximum hdisplay supported per pipe.
> + */
> +static int get_max_hdisplay(int drm_fd)
'get_max_hdisplay' -> 'get_max_pipe_hdisplay'
With these minor fixes,
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> +{
> + int dev_id = intel_get_drm_devid(drm_fd);
> +
> + return (intel_display_ver(dev_id) >= 30) ? HDISPLAY_6K_PER_PIPE :
> + HDISPLAY_5K_PER_PIPE;
> +}
> +
> +/**
> + * max_non_joiner_mode_found:
> + * @drm_fd: drm file descriptor
> + * @connector: libdrm connector
> + * @max_dot_clock: max dot clock frequency
> + * @mode: libdrm mode to be filled
> + *
> + * Finds the highest possible display mode that does
> + * not require a big joiner.
> + *
> + * Returns: True if a valid non-joiner mode is found,
> + * false otherwise.
> + */
> +bool max_non_joiner_mode_found(int drm_fd, drmModeConnector *connector,
> + int max_dotclock, drmModeModeInfo *mode)
> +{
> + int max_hdisplay = get_max_hdisplay(drm_fd);
> +
> + 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) {
> + *mode = *current_mode;
> + return true;
> + }
> + }
> +
> + return false;
> +}
> +
> /**
> * igt_is_joiner_enabled_for_pipe:
> * @drmfd: A drm file descriptor
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 1cfacf87d..7227f0b0e 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -1245,6 +1245,8 @@ int igt_get_max_dotclock(int fd);
> bool igt_bigjoiner_possible(int drm_fd, drmModeModeInfo *mode, int max_dotclock);
> bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector,
> int max_dotclock, drmModeModeInfo *mode);
> +bool max_non_joiner_mode_found(int drm_fd, drmModeConnector *connector,
> + int max_dotclock, drmModeModeInfo *mode);
> bool igt_is_joiner_enabled_for_pipe(int drmfd, enum pipe pipe);
> bool igt_ultrajoiner_possible(drmModeModeInfo *mode, int max_dotclock);
> bool ultrajoiner_mode_found(int drm_fd, drmModeConnector *connector,
next prev parent reply other threads:[~2025-02-12 10:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 7:36 [PATCH i-g-t 0/3] tests/intel/kms_joiner: Add a new test to validate non-joiner mode Jeevan B
2025-02-12 7:21 ` B, Jeevan
2025-02-12 7:36 ` [PATCH i-g-t 1/3] lib/igt_kms: Add lib changes to check if joiner is enabled for a pipe Jeevan B
2025-02-12 10:42 ` Karthik B S
2025-02-12 7:36 ` [PATCH i-g-t 2/3] lib/igt_kms: Add support to check joiner mode limit Jeevan B
2025-02-12 10:46 ` Karthik B S [this message]
2025-02-12 7:36 ` [PATCH i-g-t 3/3] tests/intel/kms_joiner: Add a new test to validate non-joiner mode Jeevan B
2025-02-12 10:50 ` Karthik B S
2025-02-12 8:15 ` ✓ Xe.CI.BAT: success for tests/intel/kms_joiner: Add a new test to validate non-joiner mode (rev7) Patchwork
2025-02-12 8:32 ` ✓ i915.CI.BAT: " Patchwork
2025-02-12 10:17 ` ✗ i915.CI.Full: failure " Patchwork
2025-02-12 14:11 ` B, Jeevan
2025-02-12 10:20 ` ✗ Xe.CI.Full: " Patchwork
2025-02-12 14:11 ` B, Jeevan
-- strict thread matches above, loose matches on Subject: below --
2025-02-10 18:36 [PATCH i-g-t 0/3] tests/intel/kms_joiner: Add a new test to validate non-joiner mode Jeevan B
2025-02-10 18:36 ` [PATCH i-g-t 2/3] lib/igt_kms: Add support to check joiner mode limit Jeevan B
2025-02-04 18:27 [PATCH i-g-t 0/3] tests/intel/kms_joiner: Add a new test to validate non-joiner mode Jeevan B
2025-02-04 18:27 ` [PATCH i-g-t 2/3] lib/igt_kms: Add support to check joiner mode limit Jeevan B
2025-02-07 8:22 ` Karthik B S
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=ecf830a1-3cbf-480d-8ed7-1e2030f1bf35@intel.com \
--to=karthik.b.s@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jeevan.b@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