From 7d48c0252c384d18318de89c54817bdfe9c832fc Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Fri, 2 Feb 2018 13:34:25 +0100 Subject: lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v4. Collecting CRC may result in a modeset and extra vblank waits. On some tests this will increase the runtime a lot, so it makes sense to keep it enabled, and only collect the most recent CRC when needed. Changes since v1: - Fix read_crc semantics. (Ville) Changes since v2: - Remove EAGAIN assert, can be reached from drain_crc. Changes since v3: - Do not infinitely loop in igt_pipe_crc_drain(). Signed-off-by: Maarten Lankhorst Reviewed-by: Mika Kahola #v2 Tested-by: Vidya Srinivas --- lib/igt_debugfs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/igt_debugfs.h') diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index d90dd7a6..8d25abfe 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -130,6 +130,8 @@ void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc); __attribute__((warn_unused_result)) int igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs, igt_crc_t **out_crcs); +void igt_pipe_crc_drain(igt_pipe_crc_t *pipe_crc); +bool igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc); void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc); void igt_hpd_storm_set_threshold(int fd, unsigned int threshold); -- cgit v1.2.3