pipe_crc: Warn if the CRC values is 0xffffffff
PATCH 1/2 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 <[email protected]>
--- lib/igt_debugfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
lib/igt_debugfs.c +6 -1
@@ -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; }
Signature · 1 line
1.8.3.1
PATCH 2/2 pipe_crc: Make collect_crc() ensure the CRC looks somewhat valid
Signed-off-by Damien Lespiau <[email protected]>
--- lib/igt_debugfs.c | 2 ++ 1 file changed, 2 insertions(+)
lib/igt_debugfs.c +2 -0
@@ -527,6 +527,8 @@ void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc)igt_pipe_crc_start (pipe_crc);read_one_crc (pipe_crc, out_crc);igt_pipe_crc_stop (pipe_crc); + +igt_assert (!igt_crc_is_null (out_crc)); }/*
Signature · 1 line
1.8.3.1
Quoted 5 lines · Damien Lespiau
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
0xffffffffto be a valid CRC value, so I don't assert here.
I think we also should go through all tests and make sure that we change all color channels of for crc based tests to use the full crc space. That aside, ack on both patches.
-Daniel
Quoted 33 lines
Signed-off-by Damien Lespiau <[email protected]>--- lib/igt_debugfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)lib/igt_debugfs.c +6
-1@@ -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; }Signature · 6 lines
1.8.3.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch