<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>
<div dir="ltr">
<div dir="ltr">IGT structure pov, this patch LGTM, and needs R-b from functionality pov:</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Acked-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com></div>
</div>
</div>
<div id="ms-outlook-mobile-signature">
<div></div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>పంపినవారు:</b> B, Jeevan <jeevan.b@intel.com><br>
<b>పంపినవి:</b> Wednesday, July 31, 2024 8:37:40 PM<br>
<b>గ్రహీత:</b> igt-dev@lists.freedesktop.org <igt-dev@lists.freedesktop.org><br>
<b>Cc:</b> Modem, Bhanuprakash <bhanuprakash.modem@intel.com>; Joshi, Kunal1 <kunal1.joshi@intel.com>; Manna, Animesh <animesh.manna@intel.com>; B, Jeevan <jeevan.b@intel.com><br>
<b>విషయం:</b> [PATCH i-g-t 2/3] tests/kms_vrr: Add new test to validate LOBF</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Validate refresh rate changes that appear to be stable but actually<br>
change slightly in the VRR using the fixed refresh rate framework<br>
for non-PSR scenarios.<br>
<br>
v2: add PR check.<br>
v3: update commit message and fix code structure.<br>
v4: update logic using existing code.<br>
v5: combine output constraints condition and minor fixes.<br>
<br>
Signed-off-by: Jeevan B <jeevan.b@intel.com><br>
Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com><br>
---<br>
tests/kms_vrr.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++--<br>
1 file changed, 57 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c<br>
index 7e8885f16..9ddb56cbc 100644<br>
--- a/tests/kms_vrr.c<br>
+++ b/tests/kms_vrr.c<br>
@@ -31,6 +31,7 @@<br>
*/<br>
<br>
#include "igt.h"<br>
+#include "igt_psr.h"<br>
#include "i915/intel_drrs.h"<br>
#include "sw_sync.h"<br>
#include <fcntl.h><br>
@@ -76,6 +77,11 @@<br>
* without a full modeset.<br>
* Functionality: LRR<br>
*<br>
+ * SUBTEST: lobf<br>
+ * Description: Test to validate link-off between active frames in non-psr<br>
+ * operation<br>
+ * Functionality: LOBF<br>
+ *<br>
* SUBTEST: max-min<br>
* Description: Oscillates between highest and lowest refresh each frame for<br>
* manual flicker profiling<br>
@@ -106,7 +112,8 @@ enum {<br>
TEST_FASTSET = 1 << 7,<br>
TEST_MAXMIN = 1 << 8,<br>
TEST_CMRR = 1 << 9,<br>
- TEST_NEGATIVE = 1 << 10,<br>
+ TEST_LINK_OFF = 1 << 10,<br>
+ TEST_NEGATIVE = 1 << 11,<br>
};<br>
<br>
enum {<br>
@@ -129,6 +136,7 @@ typedef struct vtest_ns {<br>
typedef struct data {<br>
igt_display_t display;<br>
int drm_fd;<br>
+ int debugfs_fd;<br>
igt_plane_t *primary;<br>
igt_fb_t fb[2];<br>
range_t range;<br>
@@ -784,6 +792,31 @@ test_seamless_virtual_rr_basic(data_t *data, enum pipe pipe, igt_output_t *outpu<br>
}<br>
}<br>
<br>
+/* FIXME: test_lobf : Lobf can be enabled when<br>
+ * (Set Context Latency + Guardband) > (First SDP Position + Wake Time)<br>
+ * one the depends patches are merged please fix this function.<br>
+ */<br>
+<br>
+static void<br>
+test_lobf(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)<br>
+{<br>
+ uint64_t rate[] = {0};<br>
+<br>
+ rate[0] = rate_from_refresh(data->switch_modes[HIGH_RR_MODE].vrefresh);<br>
+ prepare_test(data, output, pipe);<br>
+<br>
+ igt_info("LOBF test execution on %s, PIPE %s with VRR range: (%u-%u) Hz\n",<br>
+ output->name, kmstest_pipe_name(pipe), data->range.min, data->range.max);<br>
+<br>
+ igt_output_override_mode(output, &data->switch_modes[HIGH_RR_MODE]);<br>
+ flip_and_measure(data, output, pipe, rate, 1, TEST_DURATION_NS);<br>
+ igt_output_override_mode(output, &data->switch_modes[LOW_RR_MODE]);<br>
+ rate[0] = rate_from_refresh(data->switch_modes[LOW_RR_MODE].vrefresh);<br>
+ flip_and_measure(data, output, pipe, rate, 1, NSECS_PER_SEC);<br>
+ igt_assert_f(igt_get_i915_edp_lobf_status(data->drm_fd, output->name),<br>
+ "LOBF not enabled\n");<br>
+}<br>
+<br>
static void<br>
test_cmrr(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)<br>
{<br>
@@ -843,7 +876,9 @@ static void test_cleanup(data_t *data, enum pipe pipe, igt_output_t *output)<br>
<br>
static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags)<br>
{<br>
- if ((flags & (TEST_SEAMLESS_VRR | TEST_SEAMLESS_DRRS | TEST_CMRR)) &&<br>
+ data->debugfs_fd = igt_debugfs_dir(data->drm_fd);<br>
+<br>
+ if ((flags & (TEST_SEAMLESS_VRR | TEST_SEAMLESS_DRRS | TEST_CMRR | TEST_LINK_OFF)) &&<br>
output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)<br>
return false;<br>
<br>
@@ -853,6 +888,17 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags<br>
return false;<br>
}<br>
<br>
+ if (flags & TEST_LINK_OFF) {<br>
+ if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) ||<br>
+ psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))<br>
+ psr_disable(data->drm_fd, data->debugfs_fd, NULL);<br>
+<br>
+ if (igt_get_i915_edp_lobf_status(data->drm_fd, output->name)) {<br>
+ igt_info("LOBF not supported. \n");<br>
+ return false;<br>
+ }<br>
+ }<br>
+<br>
/* Reset output */<br>
igt_display_reset(&data->display);<br>
<br>
@@ -881,6 +927,7 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags<br>
<br>
data->range.min = data->switch_modes[LOW_RR_MODE].vrefresh;<br>
<br>
+ close(data->debugfs_fd);<br>
return true;<br>
}<br>
<br>
@@ -1037,6 +1084,14 @@ igt_main_args("drs:", long_opts, help_str, opt_handler, &data)<br>
<br>
run_vrr_test(&data, test_cmrr, TEST_CMRR);<br>
}<br>
+<br>
+ igt_describe("Test to validate the link-off between active frames in "<br>
+ "non-PSR operation.");<br>
+ igt_subtest_with_dynamic("lobf") {<br>
+ igt_require(intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 20);<br>
+<br>
+ run_vrr_test(&data, test_lobf, TEST_LINK_OFF);<br>
+ }<br>
}<br>
<br>
igt_fixture {<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</body>
</html>