summaryrefslogtreecommitdiff
path: root/lib/igt_debugfs.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-02-27 22:04:18 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-23 11:02:28 +0100
commit562bbe12f6fb75811a746c742a28d32a17b26aa9 (patch)
tree1a833996699b9d61c272f262bfd4159f00b82079 /lib/igt_debugfs.c
parente588f6dfa6f022120d5a55ef96994dbbc33d0dc9 (diff)
tests: Remove usage of igt_crc_equal and _non_null
Tests should positively check for crc matches, not for mismatches. Enforce this by only exposing and igt_assert function for comparing crcs. For the few tests which didn't just do this as consistency checks but to do functional tests add FIXME comments that some reference crc values are missing. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'lib/igt_debugfs.c')
-rw-r--r--lib/igt_debugfs.c36
1 files changed, 3 insertions, 33 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index dddd6c350..61313aad6 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -62,8 +62,8 @@
* The only way to use #igt_crc_t CRCs therefore is to compare CRCs among each
* another either for equality or difference. Otherwise CRCs must be treated as
* completely opaque values. Note that not even CRCs from different pipes or tap
- * points on the same platform can be compared. Hence only use igt_crc_is_null()
- * and igt_assert_crc_equal() to inspect CRC values captured by the same
+ * points on the same platform can be compared. Hence only use
+ * igt_assert_crc_equal() to inspect CRC values captured by the same
* #igt_pipe_crc_t object.
*
* # Other debugfs interface wrappers
@@ -188,14 +188,7 @@ FILE *igt_debugfs_fopen(const char *filename,
* Pipe CRC
*/
-/**
- * igt_crc_is_null:
- * @crc: pipe CRC value to check
- *
- * Returns: True if the CRC is null/invalid, false if it represents a captured
- * valid CRC.
- */
-bool igt_crc_is_null(igt_crc_t *crc)
+static bool igt_crc_is_null(igt_crc_t *crc)
{
int i;
@@ -212,29 +205,6 @@ bool igt_crc_is_null(igt_crc_t *crc)
}
/**
- * igt_crc_equal:
- * @a: first pipe CRC value
- * @b: second pipe CRC value
- *
- * Compares two CRC values.
- *
- * Returns: true if the two CRCs match, false otherwise.
- */
-bool igt_crc_equal(igt_crc_t *a, igt_crc_t *b)
-{
- int i;
-
- if (a->n_words != b->n_words)
- return false;
-
- 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
* @b: second pipe CRC value