[i-g-t,1/2] lib/igt_kms: Added library functions for LOBF status

Manna, Animesh animesh.manna at intel.com
Wed Jul 17 08:51:12 UTC 2024



From: Joshi, Kunal1 <kunal1.joshi at intel.com>
Sent: Wednesday, July 17, 2024 10:15 AM
To: B, Jeevan <jeevan.b at intel.com>; igt-dev at lists.freedesktop.org
Cc: Manna, Animesh <animesh.manna at intel.com>
Subject: Re: [i-g-t,1/2] lib/igt_kms: Added library functions for LOBF status


Hello Jeevan,
On 6/27/2024 12:45 AM, Jeevan B wrote:

Added helper functions to check LOBF status to check weather

it is enabled or disabled.



Signed-off-by: Jeevan B <jeevan.b at intel.com><mailto:jeevan.b at 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 174bbe6c4..1f0243eb6 100644

--- a/lib/igt_kms.c

+++ b/lib/igt_kms.c

@@ -6071,6 +6071,29 @@ void igt_dump_crtcs_fd(int drmfd)

  drmModeFreeResources(mode_resources);

 }



+/**

+ * igt_get_i915_edp_lobf_info

+ * @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_i915_edp_lobf_info(int drmfd, char *connector_name)
Small nitpick, can this be igt_get_i915_edp_lobf_status, since we are not reading other info. Also do we need to use aux wake alpm / aux less alpm status or that doesn't matter? Animesh any thoughts from you here? Thanks and Regards Kunal Joshi

I also feel aux-less and aux-wake info can be optional for igt, as a debug info we are publishing through the same lobf-debugfs entry from kernel.
Lobf-status maybe better though do not have any strong objection on lobf-info.

Regards,
Animesh





+{

+       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, "LOBF 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 01604dac9..5b1591631 100644

--- a/lib/igt_kms.h

+++ b/lib/igt_kms.h

@@ -1195,6 +1195,7 @@ void igt_require_pipe(igt_display_t *display,

 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_info(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,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20240717/70b5db73/attachment.htm>


More information about the igt-dev mailing list