lib: always reset connectors after the state is forced
PATCH 1/1 lib: always reset connectors after the state is forced
Install the exit handler to reset connector states whenever kmstest_force_connector is called, so that the connector states are always reset even if a test fails.
Signed-off-by Thomas Wood <[email protected]>
--- lib/igt_kms.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
lib/igt_kms.c +7 -7
@@ -256,6 +256,12 @@ void kmstest_set_vt_graphics_mode(void)igt_debug ("VT: graphics mode set\n" ); } + +static void reset_connectors_at_exit (int sig) +{ +igt_reset_connectors (); +} +/** * kmstest_force_connector: * @fd: drm file descriptor
@@ -337,6 +343,7 @@ bool kmstest_force_connector(int drm_fd, drmModeConnector *connector, tmp++; } +igt_install_exit_handler (reset_connectors_at_exit);igt_assert (ret !=-1 );return (ret ==-1 ) ? false : true;
@@ -1659,11 +1666,6 @@ void igt_wait_for_vblank(int drm_fd, enum pipe pipe)igt_assert (drmWaitVBlank (drm_fd, &wait_vbl) ==0 ); } -static void reset_connectors_at_exit (int sig) -{ -igt_reset_connectors (); -} -/** * igt_enable_connectors: *
@@ -1703,8 +1705,6 @@ void igt_enable_connectors(void)drmModeFreeConnector (c); }close (drm_fd); - -igt_install_exit_handler (reset_connectors_at_exit); }/**
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx