summaryrefslogtreecommitdiff
path: root/lib/igt_debugfs.c
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2020-04-08 13:19:24 -0700
committerLucas De Marchi <lucas.demarchi@intel.com>2020-04-29 17:00:38 -0700
commitdafeda5d7cef71f810d209ec52288b2a62ca5343 (patch)
tree18d293aa671093375ad0d162921fa93a4b851592 /lib/igt_debugfs.c
parent7605cfd9463a6778ebb7ebae294a97c5779a6c7f (diff)
tests/kms_fbcon_fbt: Make FBC wait_until_update() more reliable
We can't depend onto debugfs reads of the FBC status as compression takes one idle frame to recompress and we could easily miss that. Instead lets use the pipe CRC as it keeps the CRC of each frame so we can compare each other until a blink in the FBCON causes it do change. Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'lib/igt_debugfs.c')
-rw-r--r--lib/igt_debugfs.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index bf6be552..9e6c5c99 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -368,8 +368,17 @@ bool igt_debugfs_search(int device, const char *filename, const char *substring)
* Pipe CRC
*/
-static bool igt_find_crc_mismatch(const igt_crc_t *a, const igt_crc_t *b,
- int *index)
+/**
+ * igt_find_crc_mismatch:
+ * @a: first pipe CRC value
+ * @b: second pipe CRC value
+ * @index: index of the first value that mismatched
+ *
+ * Check if CRC a and CRC b mismatch.
+ *
+ * Returns true if CRC values mismatch, false otherwise;
+ */
+bool igt_find_crc_mismatch(const igt_crc_t *a, const igt_crc_t *b, int *index)
{
int nwords = min(a->n_words, b->n_words);
int i;