Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: ramanaidu.naladala@intel.com, santhosh.reddy.guddati@intel.com,
	Jeevan B <jeevan.b@intel.com>
Subject: [PATCH i-g-t 1/2] lib/igt_kms: Added library functions for aux-less ALPM status
Date: Fri, 20 Sep 2024 15:15:20 +0530	[thread overview]
Message-ID: <20240920094521.1222304-2-jeevan.b@intel.com> (raw)
In-Reply-To: <20240920094521.1222304-1-jeevan.b@intel.com>

Added helper functions to check aux-less alpm status to check
weather it is enabled or disabled.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 lib/igt_kms.c | 23 +++++++++++++++++++++++
 lib/igt_kms.h |  1 +
 2 files changed, 24 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index b40470c02..be6d6536a 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -6094,6 +6094,29 @@ bool igt_get_i915_edp_lobf_status(int drmfd, char *connector_name)
 	return strstr(buf, "LOBF status: enabled");
 }
 
+/**
+ * igt_get_aux_less_alpm_status
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Return: True if its enabled.
+ */
+bool igt_get_aux_less_alpm_status(int drmfd, char *connector_name)
+{
+	char buf[24];
+	int fd, res;
+
+	fd = igt_debugfs_connector_dir(drmfd, connector_name, O_RDONLY);
+	igt_assert(fd >= 0);
+
+	res = igt_debugfs_simple_read(fd, "i915_edp_lobf_info", buf, sizeof(buf));
+	igt_require(res > 0);
+
+	close(fd);
+
+	return strstr(buf, "Aux-less alpm status: enabled");
+}
+
 /**
  * igt_get_output_max_bpc:
  * @drmfd: A drm file descriptor
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 25ba50916..8bbb6225b 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -1196,6 +1196,7 @@ void igt_dump_connectors_fd(int drmfd);
 void igt_dump_crtcs_fd(int drmfd);
 bool igt_override_all_active_output_modes_to_fit_bw(igt_display_t *display);
 bool igt_get_i915_edp_lobf_status(int drmfd, char *connector_name);
+bool igt_get_aux_less_alpm_status(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,
-- 
2.25.1


  reply	other threads:[~2024-09-20  9:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20  9:45 [PATCH i-g-t 0/2] tests/kms_vrr: Update LOBF test to resuse the existing logic Jeevan B
2024-09-20  9:45 ` Jeevan B [this message]
2024-10-21  5:58   ` [PATCH i-g-t 1/2] lib/igt_kms: Added library functions for aux-less ALPM status B, Jeevan
2024-09-20  9:45 ` [PATCH i-g-t 2/2] tests/kms_vrr: Update LOBF test to reuse the existing logic Jeevan B
2024-09-20 10:10 ` ✓ CI.xeBAT: success for tests/kms_vrr: Update LOBF test to resuse the existing logic (rev2) Patchwork
2024-09-20 10:22 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-09-20 14:52 ` ✗ CI.xeFULL: " 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=20240920094521.1222304-2-jeevan.b@intel.com \
    --to=jeevan.b@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ramanaidu.naladala@intel.com \
    --cc=santhosh.reddy.guddati@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