[igt-dev] [v3 i-g-t 04/14] tests/debugfs_test: Fix mode selection for MST
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Mon Apr 26 18:21:26 UTC 2021
When two monitors connected through MST, the second monitor also
tries to use the same mode. So two such modes may not fit into the
link bandwidth.
This patch will find a combination of modes that fit into the BW.
Cc: Imre Deak <imre.deak at intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/debugfs_test.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
index 46ba0a8be..e66a59231 100644
--- a/tests/debugfs_test.c
+++ b/tests/debugfs_test.c
@@ -104,6 +104,7 @@ static void kms_tests(int fd, int debugfs)
igt_subtest("read_all_entries_display_on") {
/* try to light all pipes */
+retry:
for_each_pipe(&display, pipe) {
igt_output_t *output;
@@ -128,6 +129,15 @@ static void kms_tests(int fd, int debugfs)
}
}
+ if (igt_display_try_commit_atomic(&display,
+ DRM_MODE_ATOMIC_TEST_ONLY |
+ DRM_MODE_ATOMIC_ALLOW_MODESET,
+ NULL) != 0) {
+ bool found = override_all_active_output_modes_to_fit_link_bw(&display);
+ igt_require_f(found, "No valid mode combo found.\n");
+ goto retry;
+ }
+
igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
read_and_discard_sysfs_entries(debugfs, 0);
--
2.20.1
More information about the igt-dev
mailing list