summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-07-07 15:16:51 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2014-07-07 17:59:52 +0100
commit09196af60d0e7dc8b06ac78e5998d29bde66b065 (patch)
treed47e74621471efdb6fb446f0eadd4e08e5a680e6 /lib
parent4f83c4efa85bdb1cfadf0e4b44588ec581f2682b (diff)
pipe_crc: Warn if the CRC values is 0xffffffff
This is what we read when the CRC logic in in a powered down well. We really don't want that to happen. In theory, it's possible 0xffffffff to be a valid CRC value, so I don't assert here. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_debugfs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 2f655a1d..5c4bbc59 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -199,9 +199,14 @@ bool igt_crc_is_null(igt_crc_t *crc)
{
int i;
- for (i = 0; i < crc->n_words; i++)
+ for (i = 0; i < crc->n_words; i++) {
+ if (crc->crc[i] == 0xffffffff)
+ igt_warn("Suspicious CRC: it looks like the CRC "
+ "read back was from a register in a powered "
+ "down well\n");
if (crc->crc[i])
return false;
+ }
return true;
}