1
0
mirror of https://github.com/tiagovignatti/intel-gpu-tools.git synced 2025-07-16 14:35:42 +00:00

lib: add crc comparison function without an assert

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
This commit is contained in:
Lionel Landwerlin 2016-03-18 17:33:03 +00:00 committed by Matt Roper
parent a511310244
commit c7e9be2302
2 changed files with 18 additions and 0 deletions

@ -247,6 +247,23 @@ bool igt_debugfs_search(const char *filename, const char *substring)
* Pipe CRC
*/
/**
* igt_assert_crc_equal:
* @a: first pipe CRC value
* @b: second pipe CRC value
*
* Compares two CRC values.
*/
bool igt_crc_equal(igt_crc_t *a, igt_crc_t *b)
{
int i;
for (i = 0; i < a->n_words; i++)
if (a->crc[i] != b->crc[i])
return false;
return true;
}
/**
* igt_assert_crc_equal:
* @a: first pipe CRC value

@ -124,6 +124,7 @@ __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);
bool igt_crc_equal(igt_crc_t *a, igt_crc_t *b);
/*
* Drop caches