public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
	igt-dev@lists.freedesktop.org
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Subject: Re: [PATCH i-g-t v2 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test
Date: Fri, 17 Apr 2026 10:28:30 +0300	[thread overview]
Message-ID: <211893c124d2fc3418b729e7ccfa19029536b182@intel.com> (raw)
In-Reply-To: <20260416155421.2000-5-juhapekka.heikkila@gmail.com>

On Thu, 16 Apr 2026, Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> wrote:
> choose mode from connector with lowest bandwidth requirement
> for tests to try to fit tests into bandwidth limitations
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>  tests/intel/kms_sharpness_filter.c | 35 +++++++++++++++++++++++++++++-
>  1 file changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
> index 98eb671d1..cf5b0d2c7 100644
> --- a/tests/intel/kms_sharpness_filter.c
> +++ b/tests/intel/kms_sharpness_filter.c
> @@ -609,6 +609,24 @@ static void build_test_suffix(data_t *data, enum test_type type,
>  	}
>  }
>  
> +static drmModeModeInfo *find_lowest_mode(igt_output_t *output)
> +{
> +	drmModeConnector *connector = output->config.connector;
> +	drmModeModeInfo *low = NULL;
> +
> +	for (int i = 0; i < connector->count_modes; i++) {

for_each_connector_mode()

> +		drmModeModeInfo *mode = &connector->modes[i];
> +		int pixels = mode->hdisplay * mode->vdisplay;
> +		int low_pixels = low ? low->hdisplay * low->vdisplay : INT_MAX;
> +
> +		if (pixels < low_pixels ||
> +		    (pixels == low_pixels && mode->vrefresh < low->vrefresh))
> +			low = mode;
> +	}
> +
> +	return low;
> +}
> +
>  static void
>  run_sharpness_filter_test(data_t *data, enum test_type type)
>  {
> @@ -647,7 +665,22 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
>  					 data->mode->vdisplay,
>  					 data->mode->vrefresh);
>  			} else {
> -				data->mode = igt_output_get_mode(data->output);
> +				if (is_invalid_test(type)) {
> +					data->mode = igt_output_get_mode(data->output);
> +				} else {
> +					data->mode = find_lowest_mode(data->output);
> +					if (!data->mode) {
> +						igt_info("No mode found on output %s\n",
> +							 igt_output_name(data->output));
> +						continue;
> +					}
> +
> +					igt_info("Executing on lowest mode %dx%d@%d@%s\n",
> +						 data->mode->hdisplay,
> +						 data->mode->vdisplay,
> +						 data->mode->vrefresh,
> +						 data->output->name);
> +				}
>  			}
>  
>  			if (!has_sharpness_filter(data->crtc)) {

-- 
Jani Nikula, Intel

  parent reply	other threads:[~2026-04-17  7:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 15:54 [PATCH i-g-t v2 0/4] Refactor kms_sharpness_filter tests Juha-Pekka Heikkila
2026-04-16 15:54 ` [PATCH i-g-t v2 1/4] tests/intel/kms_sharpness_filter: sanitize subtest init Juha-Pekka Heikkila
2026-04-16 15:54 ` [PATCH i-g-t v2 2/4] tests/intel/kms_sharpness_filter: refactor test_sharpness_filter function Juha-Pekka Heikkila
2026-04-16 19:53   ` Sharma, Swati2
2026-04-16 15:54 ` [PATCH i-g-t v2 3/4] tests/intel/kms_sharpness_filter: restructure igt_main Juha-Pekka Heikkila
2026-04-16 19:53   ` Sharma, Swati2
2026-04-16 15:54 ` [PATCH i-g-t v2 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test Juha-Pekka Heikkila
2026-04-16 19:54   ` Sharma, Swati2
2026-04-17  7:28   ` Jani Nikula [this message]
2026-04-17  0:39 ` ✓ Xe.CI.BAT: success for Refactor kms_sharpness_filter tests (rev2) Patchwork
2026-04-17  0:53 ` ✓ i915.CI.BAT: " Patchwork
2026-04-17  3:10 ` ✗ Xe.CI.FULL: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=211893c124d2fc3418b729e7ccfa19029536b182@intel.com \
    --to=jani.nikula@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox