summaryrefslogtreecommitdiff
path: root/lib/igt_debugfs.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2015-12-18 14:35:05 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2016-01-08 15:01:59 +0200
commit909074503012a11fc631118cd3180b4a1c27646e (patch)
tree1f6998c5d989db7d4f20aabd4df4e9498081ff51 /lib/igt_debugfs.h
parent5b113d323dde18ef3bbae2f57d613be4ab7eb267 (diff)
lib: Add igt_pipe_crc_new_nonblock()
Add support for reading the CRC in non-blocking mode. Useful for tests that want to start the CRC capture, then do a bunch of operations, then collect however many CRCs that got generated. The current igt_pipe_crc_new() + igt_pipe_crc_get_crcs() method would block until it gets the requested number of CRCs, whreas in non-blocking mode we can just read as many as got generated thus far. v2: __attribute__((warn_unused_result)), document the new igt_pipe_crc_get_crcs() return value (Daniel) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'lib/igt_debugfs.h')
-rw-r--r--lib/igt_debugfs.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index 24018eb3..dac84130 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -115,11 +115,14 @@ char *igt_crc_to_string(igt_crc_t *crc);
void igt_require_pipe_crc(void);
igt_pipe_crc_t *
igt_pipe_crc_new(enum pipe pipe, enum intel_pipe_crc_source source);
+igt_pipe_crc_t *
+igt_pipe_crc_new_nonblock(enum pipe pipe, enum intel_pipe_crc_source source);
void igt_pipe_crc_free(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);
+__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_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
/*