[igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: Fix igt_pipe_get_crcs.

Petri Latvala petri.latvala at intel.com
Thu Feb 15 12:49:05 UTC 2018


On Thu, Feb 15, 2018 at 01:33:59PM +0100, Maarten Lankhorst wrote:
> read_crc returns an error instead of 0 on timeout now, so handle
> this correctly. This is a small error introduced in
> 
> commit 7d48c0252c384d18318de89c54817bdfe9c832fc
> Author: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Date:   Fri Feb 2 13:34:25 2018 +0100
> 
>     lib/igt_debugfs: Add igt_pipe_crc_get_single and igt_pipe_crc_drain, v4.
> 
> It causes the kms_chv_cursor_fail to take 27 minutes, so fix this..
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>

Reviewed-by: Petri Latvala <petri.latvala at intel.com>


> ---
>  lib/igt_debugfs.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index e2b15f9bda0b..4a119985f102 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -794,10 +794,11 @@ igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
>  		int ret;
>  
>  		ret = read_crc(pipe_crc, crc);
> +		if (ret == -EAGAIN)
> +			break;
> +
>  		if (ret < 0)
>  			continue;
> -		if (ret == 0)
> -			break;
>  
>  		n++;
>  	} while (n < n_crcs);
> -- 
> 2.16.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev


More information about the igt-dev mailing list