public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
To: Mohammed Bilal <mohammed.bilal@intel.com>,
	<igt-dev@lists.freedesktop.org>
Cc: <jeevan.b@intel.com>, <kunal1.joshi@intel.com>,
	<sebastian.brzezinka@intel.com>
Subject: Re: [PATCH i-g-t v3 1/1] tests/kms_vrr: Skip LOBF test when aux-less ALPM is not enabled
Date: Wed, 4 Mar 2026 13:54:31 +0100	[thread overview]
Message-ID: <DGU0HPHZS65P.25DVXEFAUQLWK@intel.com> (raw)
In-Reply-To: <20260302151547.3041214-2-mohammed.bilal@intel.com>

Hi Mohammed,

On Mon Mar 2, 2026 at 4:15 PM CET, Mohammed Bilal wrote:
> LOBF (Link Off Between Frames) is a feature introduced in eDP 1.5+
> that can operate in both Aux-less ALPM (Advanced Link Power Management)
> and AUX-Wake ALPM modes.Currently, the test relies on Aux-less
> ALPM support to validate LOBF functionality.
>
> Add a helper to read the Aux-less ALPM status from debugfs and
> skip the LOBF subtest when Aux-less ALPM is not enabled on the
> panel, avoiding false failures on systems that may only support
> AUX-Wake ALPM or lack ALPM support entirely.
>
> v3:
> -Rebase
>
> v2:
> -Update commit message (Jeevan)
> -Update commit message for LOBF/ALPM clarification (Kamil)
> -Rename function to igt_is_aux_less_alpm_enabled (Sebastien)
> -Add explicit null-termination (Sebastien)
> -Add igt_info() log (Sowmiya)
>
> Signed-off-by: Mohammed Bilal <mohammed.bilal@intel.com>
> ---
>  lib/igt_kms.c   | 32 ++++++++++++++++++++++++++++++++
>  lib/igt_kms.h   |  1 +
>  tests/kms_vrr.c |  4 ++++
>  3 files changed, 37 insertions(+)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 6087de365..1bef7c124 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -6575,6 +6575,38 @@ bool igt_get_i915_edp_lobf_status(int drmfd, char *connector_name)
>  	return strstr(buf, "LOBF status: enabled");
>  }
>  
> +/**
> + * igt_is_aux_less_alpm_enabled
> + * @drmfd: A drm file descriptor
> + * @connector_name: Name of the libdrm connector we're going to use
> + *
> + * Check if Aux-less ALPM (Advanced Link Power Management) mode is enabled by reading
> + * the i915_edp_lobf_info debugfs.
> + *
> + * Return: True if aux-less ALPM is enabled.
> + */
> +bool igt_is_aux_less_alpm_enabled(int drmfd, char *connector_name)
> +{
> +	char buf[256];
char buf[256] = {0}; <- fell buf with zeros

> +	int fd, res;
> +
> +	fd = igt_debugfs_connector_dir(drmfd, connector_name, O_RDONLY);
> +	if (fd < 0)
> +		return false;
> +
> +	res = igt_debugfs_simple_read(fd, "i915_edp_lobf_info", buf, sizeof(buf));
/*and read n-1, so there is allways 0 at the end*/
res = igt_debugfs_simple_read(fd, "i915_edp_lobf_info", buf, sizeof(buf)-1);

> +	close(fd);
> +
> +	if (res <= 0) {
> +		igt_info("Failed to read i915_edp_lobf_info for %s\n", connector_name);
> +		return false;
> +	}
> +
> +	buf[res < sizeof(buf) ? res : sizeof(buf) - 1] = '\0';
That’s how I’d usually do it, but yours works too. Overall, it looks good to me.

Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>


-- 
Best regards,
Sebastian


  reply	other threads:[~2026-03-04 12:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 15:15 [PATCH i-g-t v3 0/1] tests/kms_vrr: Skip LOBF test when aux-less ALPM is not enabled Mohammed Bilal
2026-03-02 15:15 ` [PATCH i-g-t v3 1/1] " Mohammed Bilal
2026-03-04 12:54   ` Sebastian Brzezinka [this message]
2026-03-03 22:20 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-03-03 22:34 ` ✓ i915.CI.BAT: " Patchwork
2026-03-04  9:24 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-04 12:22 ` ✗ i915.CI.Full: " Patchwork
2026-03-05  6:34 ` ✓ i915.CI.BAT: success for tests/kms_vrr: Skip LOBF test when aux-less ALPM is not enabled (rev2) Patchwork
2026-03-05  8:04 ` ✗ Xe.CI.FULL: failure for tests/kms_vrr: Skip LOBF test when aux-less ALPM is not enabled Patchwork
2026-03-05 11:51 ` ✓ Xe.CI.BAT: success for tests/kms_vrr: Skip LOBF test when aux-less ALPM is not enabled (rev2) Patchwork
2026-03-05 17:01 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-09 17:25 ` ✗ Fi.CI.BUILD: failure for tests/kms_vrr: Skip LOBF test when aux-less ALPM is not enabled (rev3) 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=DGU0HPHZS65P.25DVXEFAUQLWK@intel.com \
    --to=sebastian.brzezinka@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jeevan.b@intel.com \
    --cc=kunal1.joshi@intel.com \
    --cc=mohammed.bilal@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