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

Arkadiusz Hiler arkadiusz.hiler at intel.com
Fri Apr 3 13:03:03 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.

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>
Reviewed-by: Imre Deak <imre.deak at intel.com>
---
 lib/igt_kms.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 7f9fafb3..796da1fb 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2066,6 +2066,10 @@ 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 */
+	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