diff options
author | José Roberto de Souza <jose.souza@intel.com> | 2020-04-08 13:19:24 -0700 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2020-04-29 17:00:38 -0700 |
commit | dafeda5d7cef71f810d209ec52288b2a62ca5343 (patch) | |
tree | 18d293aa671093375ad0d162921fa93a4b851592 /lib | |
parent | 7605cfd9463a6778ebb7ebae294a97c5779a6c7f (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')
-rw-r--r-- | lib/igt_debugfs.c | 13 | ||||
-rw-r--r-- | lib/igt_debugfs.h | 1 |
2 files changed, 12 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; diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 7d1a6175..722c5cc3 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -85,6 +85,7 @@ typedef struct { #define INTEL_PIPE_CRC_SOURCE_AUTO "auto" #define AMDGPU_PIPE_CRC_SOURCE_DPRX "dprx" +bool igt_find_crc_mismatch(const igt_crc_t *a, const igt_crc_t *b, int *index); void igt_assert_crc_equal(const igt_crc_t *a, const igt_crc_t *b); bool igt_check_crc_equal(const igt_crc_t *a, const igt_crc_t *b); char *igt_crc_to_string_extended(igt_crc_t *crc, char delimiter, int crc_size); |