From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: bhanuprakash.modem@intel.com, kunal1.joshi@intel.com,
animesh.manna@intel.com, Jeevan B <jeevan.b@intel.com>
Subject: [PATCH i-g-t 2/2] tests/kms_vrr: Add new test to validate LOBF
Date: Wed, 31 Jul 2024 17:32:15 +0530 [thread overview]
Message-ID: <20240731120215.2946412-3-jeevan.b@intel.com> (raw)
In-Reply-To: <20240731120215.2946412-1-jeevan.b@intel.com>
Validate refresh rate changes that appear to be stable but actually
change slightly in the VRR using the fixed refresh rate framework
for non-PSR scenarios.
v2: add PR check.
v3: update commit message and fix code structure.
v4: update logic using existing code.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/kms_vrr.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 55 insertions(+), 2 deletions(-)
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 7e8885f16..851b8bbee 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -31,6 +31,7 @@
*/
#include "igt.h"
+#include "igt_psr.h"
#include "i915/intel_drrs.h"
#include "sw_sync.h"
#include <fcntl.h>
@@ -76,6 +77,11 @@
* without a full modeset.
* Functionality: LRR
*
+ * SUBTEST: lobf
+ * Description: Test to validate link-off between active frames in non-psr
+ * operation
+ * Functionality: LOBF
+ *
* SUBTEST: max-min
* Description: Oscillates between highest and lowest refresh each frame for
* manual flicker profiling
@@ -106,7 +112,8 @@ enum {
TEST_FASTSET = 1 << 7,
TEST_MAXMIN = 1 << 8,
TEST_CMRR = 1 << 9,
- TEST_NEGATIVE = 1 << 10,
+ TEST_LINK_OFF = 1 << 10,
+ TEST_NEGATIVE = 1 << 11,
};
enum {
@@ -129,6 +136,7 @@ typedef struct vtest_ns {
typedef struct data {
igt_display_t display;
int drm_fd;
+ int debugfs_fd;
igt_plane_t *primary;
igt_fb_t fb[2];
range_t range;
@@ -784,6 +792,27 @@ test_seamless_virtual_rr_basic(data_t *data, enum pipe pipe, igt_output_t *outpu
}
}
+static void
+test_lobf(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
+{
+ uint64_t rate[] = {0};
+
+ rate[0] = rate_from_refresh(data->switch_modes[HIGH_RR_MODE].vrefresh);
+ prepare_test(data, output, pipe);
+ data->debugfs_fd = igt_debugfs_dir(data->drm_fd);
+
+ igt_info("LOBF test execution on %s, PIPE %s with VRR range: (%u-%u) Hz\n",
+ output->name, kmstest_pipe_name(pipe), data->range.min, data->range.max);
+
+ igt_output_override_mode(output, &data->switch_modes[HIGH_RR_MODE]);
+ flip_and_measure(data, output, pipe, rate, 1, TEST_DURATION_NS);
+ igt_output_override_mode(output, &data->switch_modes[LOW_RR_MODE]);
+ rate[0] = rate_from_refresh(data->switch_modes[LOW_RR_MODE].vrefresh);
+ flip_and_measure(data, output, pipe, rate, 1, NSECS_PER_SEC);
+ igt_assert_f(igt_get_i915_edp_lobf_status(data->drm_fd, output->name),
+ "LOBF not enabled\n");
+}
+
static void
test_cmrr(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
{
@@ -843,6 +872,8 @@ static void test_cleanup(data_t *data, enum pipe pipe, igt_output_t *output)
static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags)
{
+ data->debugfs_fd = igt_debugfs_dir(data->drm_fd);
+
if ((flags & (TEST_SEAMLESS_VRR | TEST_SEAMLESS_DRRS | TEST_CMRR)) &&
output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
return false;
@@ -852,6 +883,20 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
igt_info("Selected panel won't support DRRS.\n");
return false;
}
+ if ((flags & TEST_LINK_OFF) &&
+ output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
+ return false;
+
+ if ((flags & TEST_LINK_OFF) &&
+ (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);
+
+ if ((flags & TEST_LINK_OFF) &&
+ igt_get_i915_edp_lobf_status(data->drm_fd, output->name)) {
+ igt_info("LOBF not supported. \n");
+ return false;
+ }
/* Reset output */
igt_display_reset(&data->display);
@@ -1030,13 +1075,21 @@ igt_main_args("drs:", long_opts, help_str, opt_handler, &data)
igt_subtest_with_dynamic("seamless-rr-switch-virtual")
run_vrr_test(&data, test_seamless_virtual_rr_basic, TEST_SEAMLESS_VIRTUAL_RR);
- igt_describe("Test to validate the the content rate exactly match with the "
+ igt_describe("Test to validate the content rate exactly match with the "
"requested rate without any frame drops.");
igt_subtest_with_dynamic("cmrr") {
igt_require(intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 20);
run_vrr_test(&data, test_cmrr, TEST_CMRR);
}
+
+ igt_describe("Test to validate the link-off between active frames in "
+ "non-PSR operation.");
+ igt_subtest_with_dynamic("lobf") {
+ igt_require(intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 20);
+
+ run_vrr_test(&data, test_lobf, TEST_LINK_OFF);
+ }
}
igt_fixture {
--
2.25.1
next prev parent reply other threads:[~2024-07-31 11:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 12:02 [PATCH i-g-t 0/2] New test to validate link-off between active regions (LOBF) Jeevan B
2024-07-31 12:02 ` [PATCH i-g-t 1/2] lib/igt_kms: Added library functions for LOBF status Jeevan B
2024-07-31 12:02 ` Jeevan B [this message]
2024-07-31 12:01 ` [PATCH i-g-t 2/2] tests/kms_vrr: Add new test to validate LOBF Joshi, Kunal1
2024-07-31 13:00 ` Modem, Bhanuprakash
2024-07-31 14:28 ` ✓ CI.xeBAT: success for New test to validate link-off between active regions (LOBF) (rev5) Patchwork
2024-07-31 14:48 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-07-31 16:39 ` ✗ CI.xeFULL: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-07-30 8:31 [PATCH i-g-t 0/2] New test to validate link-off between active regions (LOBF) Jeevan B
2024-07-30 8:31 ` [PATCH i-g-t 2/2] tests/kms_vrr: Add new test to validate LOBF Jeevan B
2024-07-30 12:44 ` Modem, Bhanuprakash
2024-07-31 9:22 ` B, Jeevan
2024-07-23 4:28 [PATCH i-g-t 0/2] New test to validate link-off between active regions (LOBF) Jeevan B
2024-07-23 4:28 ` [PATCH i-g-t 2/2] tests/kms_vrr: Add new test to validate LOBF Jeevan B
2024-07-23 11:47 ` Modem, Bhanuprakash
2024-07-22 7:50 [PATCH i-g-t 0/2] New test to validate link-off between active regions (LOBF) Jeevan B
2024-07-22 7:50 ` [PATCH i-g-t 2/2] tests/kms_vrr: Add new test to validate LOBF Jeevan B
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=20240731120215.2946412-3-jeevan.b@intel.com \
--to=jeevan.b@intel.com \
--cc=animesh.manna@intel.com \
--cc=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kunal1.joshi@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