mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-19 22:06:13 +00:00
lib/crc: Add a helper to read a single CRC value
In this case, we also take care of starting/stopping the CRC collection. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
7d0e2f618c
commit
6954103192
@ -341,6 +341,20 @@ igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
|
||||
*out_crcs = crcs;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read 1 CRC from @pipe_crc. This function blocks until the CRC is retrieved.
|
||||
* @out_crc must be allocated by the caller.
|
||||
*
|
||||
* This function takes care of the pipe_crc book-keeping, it will start/stop
|
||||
* the collection of the CRC.
|
||||
*/
|
||||
void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc)
|
||||
{
|
||||
igt_pipe_crc_start(pipe_crc);
|
||||
read_one_crc(pipe_crc, out_crc);
|
||||
igt_pipe_crc_stop(pipe_crc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Drop caches
|
||||
*/
|
||||
|
@ -79,6 +79,7 @@ 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);
|
||||
void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
|
||||
|
||||
/*
|
||||
* Drop caches
|
||||
|
Loading…
x
Reference in New Issue
Block a user