[igt-dev] [PATCH i-g-t 04/11] tests/kms_lease: Get pipe from crtc for enable pipes

Arkadiusz Hiler arkadiusz.hiler at intel.com
Wed Jul 15 14:21:54 UTC 2020


On Sun, Jul 12, 2020 at 01:35:55AM +0530, Mohammed Khajapasha wrote:
> Get pipe from drm crtc for enabled pipes only.
> 
> Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha at intel.com>
> ---
>  tests/kms_lease.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index 2e6cf9b0..75a1149c 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -684,6 +684,8 @@ static void lease_unleased_crtc(data_t *data)
>  	/* Find another CRTC that we don't control */
>  	bad_crtc_id = 0;
>  	for (p = 0; bad_crtc_id == 0 && p < data->master.display.n_pipes; p++) {
> +		if(!(data->master.display.pipes[p].enabled))
> +			continue;
>  		if (pipe_to_crtc_id(&data->master.display, p) != data->crtc_id)
>  			bad_crtc_id = pipe_to_crtc_id(&data->master.display, p);

this also can be turned into for_each_pipe, which is a bit better than
adding enabled checks everywhere


>  	}
> -- 
> 2.24.1
> 


More information about the igt-dev mailing list