All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/2] pipe_crc: Warn if the CRC values is 0xffffffff
@ 2014-07-07 17:03 Damien Lespiau
  2014-07-07 17:03 ` [PATCH i-g-t 2/2] pipe_crc: Make collect_crc() ensure the CRC looks somewhat valid Damien Lespiau
  2014-07-07 21:08 ` [PATCH i-g-t 1/2] pipe_crc: Warn if the CRC values is 0xffffffff Daniel Vetter
  0 siblings, 2 replies; 3+ messages in thread
From: Damien Lespiau @ 2014-07-07 17:03 UTC (permalink / raw)
  To: intel-gfx

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>
---
 lib/igt_debugfs.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 2f655a1..5c4bbc5 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;
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH i-g-t 2/2] pipe_crc: Make collect_crc() ensure the CRC looks somewhat valid
  2014-07-07 17:03 [PATCH i-g-t 1/2] pipe_crc: Warn if the CRC values is 0xffffffff Damien Lespiau
@ 2014-07-07 17:03 ` Damien Lespiau
  2014-07-07 21:08 ` [PATCH i-g-t 1/2] pipe_crc: Warn if the CRC values is 0xffffffff Daniel Vetter
  1 sibling, 0 replies; 3+ messages in thread
From: Damien Lespiau @ 2014-07-07 17:03 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 lib/igt_debugfs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 5c4bbc5..d4a6cf6 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -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));
 }
 
 /*
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH i-g-t 1/2] pipe_crc: Warn if the CRC values is 0xffffffff
  2014-07-07 17:03 [PATCH i-g-t 1/2] pipe_crc: Warn if the CRC values is 0xffffffff Damien Lespiau
  2014-07-07 17:03 ` [PATCH i-g-t 2/2] pipe_crc: Make collect_crc() ensure the CRC looks somewhat valid Damien Lespiau
@ 2014-07-07 21:08 ` Daniel Vetter
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-07-07 21:08 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: intel-gfx

On Mon, Jul 07, 2014 at 06:03:29PM +0100, Damien Lespiau wrote:
> 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.

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

> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  lib/igt_debugfs.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index 2f655a1..5c4bbc5 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;
>  }
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-07 21:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-07 17:03 [PATCH i-g-t 1/2] pipe_crc: Warn if the CRC values is 0xffffffff Damien Lespiau
2014-07-07 17:03 ` [PATCH i-g-t 2/2] pipe_crc: Make collect_crc() ensure the CRC looks somewhat valid Damien Lespiau
2014-07-07 21:08 ` [PATCH i-g-t 1/2] pipe_crc: Warn if the CRC values is 0xffffffff Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.