[igt-dev] [PATCH i-g-t] tests/kms_flip_scaled: on mode selection choose mode with lowest vertical refresh

Kahola, Mika mika.kahola at intel.com
Tue Feb 2 11:03:38 UTC 2021


> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Juha-
> Pekka Heikkila
> Sent: Monday, February 1, 2021 8:41 PM
> To: igt-dev at lists.freedesktop.org
> Subject: [igt-dev] [PATCH i-g-t] tests/kms_flip_scaled: on mode selection
> choose mode with lowest vertical refresh
> 
> Use mode with lowest vertical refresh to keep needed cdclk down.
> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>

Reviewed-by: Mika Kahola <mika.kahola at intel.com>

> ---
>  tests/kms_flip_scaled_crc.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_flip_scaled_crc.c b/tests/kms_flip_scaled_crc.c index
> f77484063..c41709b68 100644
> --- a/tests/kms_flip_scaled_crc.c
> +++ b/tests/kms_flip_scaled_crc.c
> @@ -174,9 +174,12 @@ static void test_flip_to_scaled(data_t *data,
> uint32_t index, enum pipe pipe,
>  	for (int i = 0; i < output->config.connector->count_modes; i++) {
>  		if (output->config.connector->modes[i].hdisplay == data-
> >attemptmodewidth &&
>  		   output->config.connector->modes[i].vdisplay == data-
> >attemptmodeheight) {
> +			if (modetoset &&
> +			    modetoset->vrefresh < output->config.connector-
> >modes[i].vrefresh)
> +				continue;
> +
>  			modetoset = &output->config.connector->modes[i];
> -			break;
> -		   }
> +		}
>  	}
> 
>  	if (!modetoset)
> --
> 2.28.0
> 
> _______________________________________________
> 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