[PATCH i-g-t] lib/igt_kms: Update igt_fit_modes_in_bw to add legacy commit check
Karthik B S
karthik.b.s at intel.com
Thu Jul 10 19:46:43 UTC 2025
Currently igt_fit_modes_in_bw is only checking for atomic commit but the
igt_override_all_active_output_modes_to_fit_bw function which it is
wrapping actually has support for legacy commit as well.
To handle this, add support for legacy commit check as well.
Signed-off-by: Karthik B S <karthik.b.s at intel.com>
---
lib/igt_kms.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 84ba1635c..7dee8ab2c 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -5061,9 +5061,13 @@ bool igt_fit_modes_in_bw(igt_display_t *display)
{
int ret;
- ret = igt_display_try_commit_atomic(display,
- DRM_MODE_ATOMIC_TEST_ONLY |
- DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ if (display->is_atomic)
+ ret = igt_display_try_commit_atomic(display,
+ DRM_MODE_ATOMIC_TEST_ONLY |
+ DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ else
+ ret = igt_display_try_commit2(display, COMMIT_LEGACY);
+
if (ret != 0) {
bool found;
--
2.43.0
More information about the igt-dev
mailing list