All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/2] tests/kms_force_connector: clear forced edid in reset
@ 2015-11-10 14:32 Thomas Wood
  2015-11-10 14:32 ` [PATCH i-g-t 2/2] tests/kms_force_connector: reset connectors and edid on exit Thomas Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Wood @ 2015-11-10 14:32 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
 tests/kms_force_connector.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/kms_force_connector.c b/tests/kms_force_connector.c
index f34f21a..a79c974 100644
--- a/tests/kms_force_connector.c
+++ b/tests/kms_force_connector.c
@@ -47,6 +47,8 @@ static void __attribute__((noreturn)) reset_connectors()
 		kmstest_force_connector(drm_fd, connector,
 					FORCE_CONNECTOR_UNSPECIFIED);
 
+		kmstest_force_edid(drm_fd, connector, NULL, 0);
+
 		drmModeFreeConnector(connector);
 	}
 
@@ -76,7 +78,7 @@ int main(int argc, char **argv)
 		{0, 0, 0, 0}
 	};
 	const char *help_str =
-	       "  --reset\t\tReset all connector force states.\n";
+	       "  --reset\t\tReset all connector force states and edid.\n";
 
 	igt_subtest_init_parse_opts(&argc, argv, "", long_opts, help_str,
 				    opt_handler, NULL);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH i-g-t 2/2] tests/kms_force_connector: reset connectors and edid on exit
  2015-11-10 14:32 [PATCH i-g-t 1/2] tests/kms_force_connector: clear forced edid in reset Thomas Wood
@ 2015-11-10 14:32 ` Thomas Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Wood @ 2015-11-10 14:32 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
 tests/kms_force_connector.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/kms_force_connector.c b/tests/kms_force_connector.c
index a79c974..cf918a7 100644
--- a/tests/kms_force_connector.c
+++ b/tests/kms_force_connector.c
@@ -31,7 +31,7 @@ IGT_TEST_DESCRIPTION("Check the debugfs force connector/edid features work"
 	igt_assert_eq(m.hdisplay, h); igt_assert_eq(m.vdisplay, w); \
 	igt_assert_eq(m.vrefresh, r);
 
-static void __attribute__((noreturn)) reset_connectors()
+static void reset_connectors()
 {
 	int drm_fd = 0;
 	drmModeRes *res;
@@ -51,8 +51,6 @@ static void __attribute__((noreturn)) reset_connectors()
 
 		drmModeFreeConnector(connector);
 	}
-
-	exit(0);
 }
 
 static int opt_handler(int opt, int opt_index, void *data)
@@ -60,6 +58,7 @@ static int opt_handler(int opt, int opt_index, void *data)
 	switch (opt) {
 	case 'r':
 		reset_connectors();
+		exit(0);
 		break;
 	}
 
@@ -172,6 +171,9 @@ int main(int argc, char **argv)
 
 	igt_fixture {
 		drmModeFreeConnector(vga_connector);
+		close(drm_fd);
+
+		reset_connectors();
 	}
 
 	igt_exit();
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-10 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-10 14:32 [PATCH i-g-t 1/2] tests/kms_force_connector: clear forced edid in reset Thomas Wood
2015-11-10 14:32 ` [PATCH i-g-t 2/2] tests/kms_force_connector: reset connectors and edid on exit Thomas Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.