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>
Cc: <swati2.sharma@intel.com>
Subject: Re: [PATCH i-g-t 4/6] tests/intel/kms_joiner_helper: Add lib changes to check joiner is enabled
Date: Fri, 31 Jan 2025 10:03:17 +0530	[thread overview]
Message-ID: <a35132cf-2f08-4d9c-b04f-084bf74027fb@intel.com> (raw)
In-Reply-To: <20250130172031.4126606-5-jeevan.b@intel.com>

Hi,

On 1/30/2025 10:50 PM, Jeevan B wrote:
> Added a library change where we if joiner is enabled or not.
Please fix the commit message.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
>   tests/intel/kms_joiner_helper.c | 38 +++++++++++++++++++++++++++++++++
>   tests/intel/kms_joiner_helper.h |  2 ++
>   2 files changed, 40 insertions(+)
>
> diff --git a/tests/intel/kms_joiner_helper.c b/tests/intel/kms_joiner_helper.c
> index af89be777..a86099fb7 100644
> --- a/tests/intel/kms_joiner_helper.c
> +++ b/tests/intel/kms_joiner_helper.c
> @@ -3,6 +3,44 @@
>   #include "igt_kms.h"
>   #include "intel_chipset.h"
>   
> +/**
> + * is_joiner_has
> + * @drmfd: A drm file descriptor
> + *
> + * Returns: True if joiner is enabled, false otherwise.
> + */
> +bool is_joiner_has(int drmfd)
> +{
> +	if (!igt_check_joiner_enabled(drmfd)) {
> +		igt_debug("Joiner is NOT Enabled\n");
> +		return false;
> +	}
> +
> +	return true;
> +}
Is this wrapper adding any additional value?
> +
> +/**
> + * igt_check_joiner_enabled:
> + * @drmfd: A drm file descriptor
> + *
> + * Returns: True if joiner is enabled, false otherwise.
> + */
> +bool igt_check_joiner_enabled(int drmfd)
> +{
> +	char buf[4096];
> +	int dir, res;
> +
> +	dir = igt_debugfs_dir(drmfd);
> +	igt_assert(dir >= 0);
> +
> +	res = igt_debugfs_simple_read(dir, "i915_display_info",
> +					    buf, sizeof(buf));
> +	close(dir);
> +
> +	return res > 0 ? (strstr(buf, "pipes as a master") &&
> +			  strstr(buf, "pipes as a slave")) : 0;

Please make the check more specific by checking for the exact pipe we're 
committing on.

Thanks,
Karthik.B.S
> +}
> +
>   /*
>    * Detect if the output needs 1, 2, or 4 pipes (non-joiner, big joiner, ultra).
>    * This re-uses your existing logic from:
> diff --git a/tests/intel/kms_joiner_helper.h b/tests/intel/kms_joiner_helper.h
> index 95e71a229..e38b9f61b 100644
> --- a/tests/intel/kms_joiner_helper.h
> +++ b/tests/intel/kms_joiner_helper.h
> @@ -3,6 +3,8 @@
>   
>   #include "igt_kms.h"
>   
> +bool is_joiner_has(int drmfd);
> +bool igt_check_joiner_enabled(int drmfd);
>   void igt_set_all_master_pipes_for_platform(igt_display_t *display,
>   					   uint32_t *master_pipes);
>   bool igt_assign_pipes_for_outputs(int drm_fd,

  reply	other threads:[~2025-01-31  4:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-30 17:20 [PATCH i-g-t 0/6] tests/intel/kms_joiner: Add a new test to validate non-joiner mode Jeevan B
2025-01-30 17:20 ` [PATCH i-g-t 1/6] tests/intel/kms_joiner_helper: helper for joiner-related functions Jeevan B
2025-01-30 17:20 ` [PATCH i-g-t 2/6] tests/intel/kms_mst_helper: Add helper for MST-related functions Jeevan B
2025-01-30 17:20 ` [PATCH i-g-t 3/6] tests/kms_feature_discovery: Add tests for UHBR/non-UHBR over SST/MST Jeevan B
2025-01-30 17:20 ` [PATCH i-g-t 4/6] tests/intel/kms_joiner_helper: Add lib changes to check joiner is enabled Jeevan B
2025-01-31  4:33   ` Karthik B S [this message]
2025-01-30 17:20 ` [PATCH i-g-t 5/6] tests/intel/kms_joiner: Add a new test to validate non-joiner mode Jeevan B
2025-01-31  4:36   ` Karthik B S
2025-01-30 17:20 ` [PATCH i-g-t 6/6] HAX: DO NOT MERGE Jeevan B
2025-01-30 17:58 ` ✗ Xe.CI.BAT: failure for tests/intel/kms_joiner: Add a new test to validate non-joiner mode (rev3) Patchwork
2025-01-30 18:23 ` ✗ i915.CI.BAT: " Patchwork
2025-01-30 20:20 ` ✗ Xe.CI.Full: " Patchwork
2025-01-31  7:38 ` ✗ Xe.CI.BAT: failure for tests/intel/kms_joiner: Add a new test to validate non-joiner mode (rev4) Patchwork
2025-01-31  7:53 ` ✗ i915.CI.BAT: " Patchwork
2025-01-31 11:00 ` ✗ Xe.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=a35132cf-2f08-4d9c-b04f-084bf74027fb@intel.com \
    --to=karthik.b.s@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jeevan.b@intel.com \
    --cc=swati2.sharma@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