[PATCH i-g-t v3 4/6] tests/kms_vrr: Add new test for DC3CO validation with LOBF

Jeevan B
2026-04-23T17:37:29Z

Add lobf-dc3co subtest to validate DC3CO entry during link-off
between frames.

v2: Fix the flow logic.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/kms_vrr.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 30bda3244..b98672520 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -29,6 +29,7 @@
*/

#include "igt.h"
+#include "igt_pm.h"
#include "igt_psr.h"
#include "i915/intel_drrs.h"
#include "sw_sync.h"
@@ -80,6 +81,9 @@
*
* SUBTEST: negative-basic
* Description: Make sure that VRR should not be enabled on the Non-VRR panel.
+ *
+ * SUBTEST: lobf-dc3co
+ * Description: Test DC3CO entry during LOBF.
*/

#define NSECS_PER_SEC (1000000000ull)
@@ -947,6 +951,25 @@ test_lobf(data_t *data, igt_crtc_t *crtc, igt_output_t *output,
igt_assert_f(lobf_enabled, "LOBF not enabled\n");
}

+static void test_lobf_dc3co(data_t *data, igt_crtc_t *crtc,
+ igt_output_t *output, uint32_t flags)
+{
+ unsigned long dc3co_count_before, dc3co_count_after;
+
+ dc3co_count_before = igt_read_dc_counter(data->debugfs_fd,
+ IGT_INTEL_CHECK_DC3CO);
+
+ test_lobf(data, crtc, output, flags);
+
+ dc3co_count_after = igt_read_dc_counter(data->debugfs_fd,
+ IGT_INTEL_CHECK_DC3CO);
+
+ igt_assert_f(dc3co_count_after > dc3co_count_before,
+ "DC3CO should be entered during link-off periods. "
+ "Before: %lu, After: %lu\n",
+ dc3co_count_before, dc3co_count_after);
+}
+
static void
test_cmrr(data_t *data, igt_crtc_t *crtc, igt_output_t *output,
uint32_t flags)
@@ -1242,6 +1265,16 @@ int igt_main_args("drs:", long_opts, help_str, opt_handler, &data)

run_vrr_test(&data, test_lobf, TEST_LINK_OFF);
}
+
+ igt_describe("Test to validate DC3CO entry during link-off between active "
+ "frames in non-PSR operation.");
+ igt_subtest_with_dynamic("lobf-dc3co") {
+ igt_require(intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 35);
+
+ igt_require_dc_counter(data.debugfs_fd, IGT_INTEL_CHECK_DC3CO);
+
+ run_vrr_test(&data, test_lobf_dc3co, TEST_LINK_OFF);
+ }
}

igt_fixture() {
--
2.43.0