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

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];
+	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));
+	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';
+
+	return strstr(buf, "Aux-less alpm status: enabled") != NULL;
+}
+
 /**
  * igt_get_output_max_bpc:
  * @drmfd: A drm file descriptor
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 1e1f3ead5..5c3e55e2d 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -1233,6 +1233,7 @@ bool igt_override_all_active_output_modes_to_fit_bw(igt_display_t *display);
 bool igt_fit_modes_in_bw(igt_display_t *display);
 bool igt_has_lobf_debugfs(int drmfd, igt_output_t *output);
 bool igt_get_i915_edp_lobf_status(int drmfd, char *connector_name);
+bool igt_is_aux_less_alpm_enabled(int drmfd, char *connector_name);
 unsigned int igt_get_output_max_bpc(int drmfd, char *connector_name);
 unsigned int igt_get_pipe_current_bpc(int drmfd, enum pipe pipe);
 void igt_assert_output_bpc_equal(int drmfd, enum pipe pipe,
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 569000fee..3dc64dfdb 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -908,6 +908,10 @@ test_lobf(data_t *data, igt_crtc_t *crtc, igt_output_t *output,
 			igt_skip("i915_edp_lobf_status not present for %s\n",
 				 igt_output_name(output));
 
+		if (!igt_is_aux_less_alpm_enabled(data->drm_fd, output->name))
+			igt_skip("%s: Aux-less ALPM not enabled, LOBF not supported.\n",
+				 igt_output_name(output));
+
 		if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) ||
 		    psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))
 			psr_disable(data->drm_fd, data->debugfs_fd, NULL);
-- 
2.48.1


  reply	other threads:[~2026-03-02 15:18 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 ` Mohammed Bilal [this message]
2026-03-04 12:54   ` [PATCH i-g-t v3 1/1] " Sebastian Brzezinka
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=20260302151547.3041214-2-mohammed.bilal@intel.com \
    --to=mohammed.bilal@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jeevan.b@intel.com \
    --cc=kunal1.joshi@intel.com \
    --cc=sebastian.brzezinka@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