Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 1/3] lib/igt_kms: Add lib changes to check joiner is enabled
Date: Fri, 7 Feb 2025 11:21:58 +0530	[thread overview]
Message-ID: <3fd0b917-c455-400b-99b4-1666847b7927@intel.com> (raw)
In-Reply-To: <20250204182734.793645-2-jeevan.b@intel.com>

Hi,

On 2/4/2025 11:57 PM, Jeevan B wrote:
> Added a library change where we if joiner is enabled or not.
Please fix the commit message.
>
> v2: Update function name and logic to check joiner
>      enabled for exact pipe. (Karthik)
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
>   lib/igt_kms.c | 31 +++++++++++++++++++++++++++++++
>   lib/igt_kms.h |  1 +
>   2 files changed, 32 insertions(+)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 90f44b4d3..d4980d2ac 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -6406,6 +6406,37 @@ bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector,
>   	return found;
>   }
>   
> +/**
> + * igt_is_joiner_enabled:
> + * @drmfd: A drm file descriptor
> + * @pipe: display pipe
> + *
> + * Returns: True if joiner is enabled, false otherwise.
> + */
> +bool igt_is_joiner_enabled(int drmfd, enum pipe pipe)
igt_is_joiner_enabled -> igt_is_joiner_enabled_for_pipe
> +{
> +	char buf[16384], master_str[64], slave_str[64];
> +	int dir, res;
> +	int initial_number = 0b11;

I think this variable can be named better, may be pipe_mask or something 
similar to this?

Thanks,
Karthik.B.S

> +
> +
> +	dir = igt_debugfs_dir(drmfd);
> +	igt_assert(dir >= 0);
> +
> +	res = igt_debugfs_simple_read(dir, "i915_display_info",
> +					    buf, sizeof(buf));
> +	close(dir);
> +	igt_assert(res >= 0);
> +	initial_number <<= pipe;
> +
> +	snprintf(master_str, sizeof(master_str),
> +		 "Linked to 0x%X pipes as a master", initial_number);
> +	snprintf(slave_str, sizeof(slave_str),
> +		 "Linked to 0x%X pipes as a slave", initial_number);
> +
> +	return (strstr(buf, master_str) && strstr(buf, slave_str));
> +}
> +
>   /**
>    * igt_ultrajoiner_possible:
>    * @mode: libdrm mode
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 8810123fb..7df53ec9c 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -1245,6 +1245,7 @@ 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 igt_is_joiner_enabled(int drmfd, enum pipe pipe);
>   bool igt_ultrajoiner_possible(drmModeModeInfo *mode, int max_dotclock);
>   bool ultrajoiner_mode_found(int drm_fd, drmModeConnector *connector,
>   			  int max_dotclock, drmModeModeInfo *mode);

  reply	other threads:[~2025-02-07  5:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 1/3] lib/igt_kms: Add lib changes to check joiner is enabled Jeevan B
2025-02-07  5:51   ` Karthik B S [this message]
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
2025-02-04 18:27 ` [PATCH i-g-t 3/3] tests/intel/kms_joiner: Add a new test to validate non-joiner mode Jeevan B
2025-02-07  8:25   ` Karthik B S
2025-02-05  1:48 ` ✗ GitLab.Pipeline: warning for tests/intel/kms_joiner: Add a new test to validate non-joiner mode (rev5) Patchwork
2025-02-05  2:18 ` ✓ Xe.CI.BAT: success " Patchwork
2025-02-05  2:21 ` ✓ i915.CI.BAT: " Patchwork
2025-02-05  9:08 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-05 10:14 ` ✗ i915.CI.Full: " Patchwork

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=3fd0b917-c455-400b-99b4-1666847b7927@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