[igt-dev] [PATCH i-g-t] lib/igt_debugfs: Add timeouts to opening pipe CRC fd.

Souza, Jose jose.souza at intel.com
Thu Apr 5 21:03:46 UTC 2018


On Thu, 2018-04-05 at 12:49 +0200, Maarten Lankhorst wrote:
> This will fix the PSR tests to fail slightly faster, since they wait
> indefinitely for a CRC that never comes during open.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
>  lib/igt_debugfs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index 8adc02e9cc47..094df564b6f4 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -757,7 +757,10 @@ void igt_pipe_crc_start(igt_pipe_crc_t
> *pipe_crc)
>  
>  	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
>  
> +	igt_set_timeout(5, "Opening crc fd, which waits for first
> CRC.");
>  	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc-
> >flags);
> +	igt_reset_timeout();

Hum I was able to reproduce this one too in a KBL, I was thinking in
add a timeout in the kernel side, if it don't get the CRC buffer filled
it would return a error.


> +
>  	igt_assert(pipe_crc->crc_fd != -1);
>  	errno = 0;
>  }


More information about the igt-dev mailing list