diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-06 10:48:25 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-06 14:51:14 +0100 |
commit | a4d3a6c013664da062cdff9ead7bc9ab86b33caa (patch) | |
tree | f1ceefed5573bb8b3e4ad0986a5e7415e7945316 /lib | |
parent | c1b7e722dafdbddcce2bec230e3faf8b4fe6f123 (diff) |
lib: make igt_pipe_crc_start never fail
It's what callers expect - pipe_crc_new is the function where
we pass a potential failure back to callers.
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_debugfs.c | 7 | ||||
-rw-r--r-- | lib/igt_debugfs.h | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 139be893..4b965213 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -269,12 +269,11 @@ void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc) free(pipe_crc); } -bool igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc) +void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc) { igt_crc_t *crcs = NULL; - if (!igt_pipe_crc_do_start(pipe_crc)) - return false; + igt_assert(igt_pipe_crc_do_start(pipe_crc)); /* * For some no yet identified reason, the first CRC is bonkers. So @@ -282,8 +281,6 @@ bool igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc) */ igt_pipe_crc_get_crcs(pipe_crc, 1, &crcs); free(crcs); - - return true; } void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc) diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 393b5767..075e4462 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -75,7 +75,7 @@ igt_pipe_crc_t * igt_pipe_crc_new(igt_debugfs_t *debugfs, int drm_fd, enum pipe pipe, enum intel_pipe_crc_source source); void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc); -bool igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc); +void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc); void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc); void igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs, igt_crc_t **out_crcs); |