diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-31 16:09:46 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-11-01 21:10:59 +0100 |
commit | 0369fe19b8b8e19e0815361b5187eba81cb2d71a (patch) | |
tree | 9deae55c52894d7f240fb0c566ef717288efc99b /tests | |
parent | 43def94f3213634c2c798049cb17efc14801a9ed (diff) |
lib: consolidate pipe crc exit handler
No need to sprinkle this all over:
- exit handlers will only be registered once
- they're always called when exiting, so no need to explictly call
them.
This allows us to hide all the pipe crc cleanup in the library.
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/debugfs_pipe_crc.c | 7 | ||||
-rw-r--r-- | tests/kms_cursor_crc.c | 7 |
2 files changed, 0 insertions, 14 deletions
diff --git a/tests/debugfs_pipe_crc.c b/tests/debugfs_pipe_crc.c index 770bbdb2..01cd8b51 100644 --- a/tests/debugfs_pipe_crc.c +++ b/tests/debugfs_pipe_crc.c @@ -206,11 +206,6 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags) } -static void exit_handler(int sig) -{ - igt_pipe_crc_reset(); -} - int main(int argc, char **argv) { data_t data = {0, }; @@ -226,7 +221,6 @@ int main(int argc, char **argv) data.drm_fd = drm_open_any(); do_or_die(igt_set_vt_graphics_mode()); - do_or_die(igt_install_exit_handler(exit_handler)); display_init(&data); @@ -262,7 +256,6 @@ int main(int argc, char **argv) } igt_fixture { - igt_pipe_crc_reset(); display_fini(&data); fclose(data.ctl); } diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index cddfe10c..c82d3e76 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -304,11 +304,6 @@ static void run_test(data_t *data, enum cursor_type cursor_type, bool onscreen) igt_require_f(valid_tests, "no valid crtc/connector combinations found\n"); } -static void exit_handler(int sig) -{ - igt_pipe_crc_reset(); -} - static void create_cursor_fb(data_t *data, enum cursor_type cursor_type, double r, double g, double b, double a) @@ -340,7 +335,6 @@ int main(int argc, char **argv) data.drm_fd = drm_open_any(); do_or_die(igt_set_vt_graphics_mode()); - do_or_die(igt_install_exit_handler(exit_handler)); igt_debugfs_init(&data.debugfs); data.ctl = igt_debugfs_fopen(&data.debugfs, @@ -378,7 +372,6 @@ int main(int argc, char **argv) run_test(&data, BLACK_INVISIBLE, false); igt_fixture { - igt_pipe_crc_reset(); display_fini(&data); fclose(data.ctl); } |