[igt-dev] [PATCH i-g-t 4/7] lib/kms: Commit reasonable defaults on display init

Arkadiusz Hiler arkadiusz.hiler at intel.com
Tue Apr 7 13:16:30 UTC 2020


We often end up with a leftover state from fbcon with a mode enabled on
some of the connecters. Let's clean that up.

v2: commit only if we have pipes and outputs

Issue: https://gitlab.freedesktop.org/drm/intel/issues/323
Cc: Imre Deak <imre.deak at intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
---
 lib/igt_kms.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 7f9fafb3..4ffc3ed2 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2066,6 +2066,12 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 	/* Set reasonable default values for every object in the display. */
 	igt_display_reset(display);
 
+	/* Commit those resonable defaults to clean up fbcon/etc leftover state */
+	if (display->n_pipes && display->n_outputs) {
+		igt_display_commit2(display,
+				    display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+	}
+
 out:
 	LOG_UNINDENT(display);
 
-- 
2.24.1



More information about the igt-dev mailing list