From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
<igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test
Date: Fri, 10 Apr 2026 11:30:08 +0530 [thread overview]
Message-ID: <46b9d351-a1fe-41de-90fa-dc8a6c96540f@intel.com> (raw)
In-Reply-To: <20260331190412.1907571-5-juhapekka.heikkila@gmail.com>
Hi JP
On 01-04-2026 12:34 am, Juha-Pekka Heikkila 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 | 34 +++++++++++++++++++++++++++++-
> 1 file changed, 33 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
> index f08d33d7a..10061b5d9 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)
We do have igt_output_get_lowres_mode(), check if this can be reused?
> +{
> + drmModeConnector *connector = output->config.connector;
> + drmModeModeInfo *low = NULL;
> +
> + for (int i = 0; i < connector->count_modes; i++) {
> + 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)
> {
> @@ -645,7 +663,21 @@ 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));
Fix indentation
> + continue;
> + }
> +
> + igt_info("Executing on lowest mode %dx%d@%d\n",
Add output name in igt_info()
> + data->mode->hdisplay,
> + data->mode->vdisplay,
> + data->mode->vrefresh);
Fix indentation
> + }
> }
>
> igt_output_override_mode(data->output, data->mode);
next prev parent reply other threads:[~2026-04-10 6:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 19:04 [PATCH i-g-t 0/4] Refactor kms_sharpness_filter tests Juha-Pekka Heikkila
2026-03-31 19:04 ` [PATCH i-g-t 1/4] tests/intel/kms_sharpness_filter: sanitize subtest init Juha-Pekka Heikkila
2026-04-10 5:40 ` Sharma, Swati2
2026-03-31 19:04 ` [PATCH i-g-t 2/4] tests/intel/kms_sharpness_filter: refactor test_sharpness_filter function Juha-Pekka Heikkila
2026-04-09 12:03 ` Sharma, Swati2
2026-03-31 19:04 ` [PATCH i-g-t 3/4] tests/intel/kms_sharpness_filter: restructure igt_main Juha-Pekka Heikkila
2026-04-10 5:31 ` Sharma, Swati2
2026-03-31 19:04 ` [PATCH i-g-t 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test Juha-Pekka Heikkila
2026-04-10 6:00 ` Sharma, Swati2 [this message]
2026-04-01 0:32 ` ✓ Xe.CI.BAT: success for Refactor kms_sharpness_filter tests Patchwork
2026-04-01 0:33 ` ✓ i915.CI.BAT: " Patchwork
2026-04-01 8:28 ` ✓ Xe.CI.FULL: " Patchwork
2026-04-01 18:41 ` ✗ i915.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=46b9d351-a1fe-41de-90fa-dc8a6c96540f@intel.com \
--to=swati2.sharma@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