[igt-dev] [PATCH i-g-t 3/3] tests/kms_fbcon_fbt: Drop master before restoring fbcon

Daniel Vetter daniel.vetter at ffwll.ch
Tue Jan 28 11:25:49 UTC 2020


fbdev helpers refuse to restore the fbdev screen if there's still a
master present. This is to avoid fbcon popping up when a compositor
has intentionally disabled all outputs.

Unfortunately the kernel had some bugs in this area, and kms_fbcon_fbt
relied on those. Result was that fbdev restore was skipped, which
skipped the frontbuffer flushing, which broke the PSR subtest's
expectation that PSR is always disable when fbdev is enabled. FBC did
not get broken because FBC was never enabled on linear framebuffers as
used by fbdev.

Fix things up to make sure fbcon gets restored correctly in all cases.

Cc: Noralf Trønnes <noralf at tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 tests/kms_fbcon_fbt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c
index 236e09ea1ebd..ed4cccbe743e 100644
--- a/tests/kms_fbcon_fbt.c
+++ b/tests/kms_fbcon_fbt.c
@@ -74,6 +74,8 @@ static void teardown_drm(struct drm_info *drm)
 {
 	int i;
 
+	igt_assert_eq(drmDropMaster(drm->fd), 0);
+
 	kmstest_restore_vt_mode();
 
 	for (i = 0; i < drm->res->count_connectors; i++)
-- 
2.24.1



More information about the igt-dev mailing list