From: Jani Nikula <jani.nikula@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 3/3] tests/kms: Use for_each_plane_format()
Date: Thu, 16 Apr 2026 18:44:40 +0300 [thread overview]
Message-ID: <4767f04c74476bdc0ae381fd690dab496d4668d9@intel.com> (raw)
In-Reply-To: <20260416141334.20086-3-ville.syrjala@linux.intel.com>
On Thu, 16 Apr 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Replace the open coded copies of for_each_plane_format()
> with the real thing.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> tests/kms_plane_scaling.c | 8 ++++----
> tests/kms_rotation_crc.c | 7 +++----
> 2 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index fde8b8370c9f..90dc5593579f 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -800,16 +800,16 @@ test_scaler_with_pixel_format_crtc(data_t *d, double sf_plane,
>
> for_each_plane_on_crtc(crtc, plane) {
> struct igt_vec tested_formats;
> + int iteration = 0;
> + uint32_t format;
>
> if (plane->type == DRM_PLANE_TYPE_CURSOR)
> continue;
>
> igt_vec_init(&tested_formats, sizeof(uint32_t));
>
> - for (int j = 0; j < plane->drm_plane->count_formats; j++) {
> - uint32_t format = plane->drm_plane->formats[j];
> -
> - if (!test_crtc_iteration(d, crtc, j))
> + for_each_plane_format(plane, format) {
> + if (!test_crtc_iteration(d, crtc, iteration++))
> continue;
>
> if (test_format(d, &tested_formats, format) &&
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index 4420053f1c6d..4a249ed21801 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -606,7 +606,7 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
>
> for_each_crtc_with_valid_output(display, crtc, output) {
> igt_plane_t *plane;
> - int i, j, c;
> + int i, c;
>
> igt_display_reset(display);
>
> @@ -678,12 +678,11 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
>
> if (!data->override_fmt) {
> struct igt_vec tested_formats;
> + uint32_t format;
>
> igt_vec_init(&tested_formats, sizeof(uint32_t));
>
> - for (j = 0; j < plane->drm_plane->count_formats; j++) {
> - uint32_t format = plane->drm_plane->formats[j];
> -
> + for_each_plane_format(plane, format) {
> if (!test_format(data, &tested_formats, format))
> continue;
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-04-16 15:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 14:13 [PATCH i-g-t 1/3] lib/kms: Introduce for_each_plane_format() Ville Syrjala
2026-04-16 14:13 ` [PATCH i-g-t 2/3] lib/kms: Use for_each_plane_format() for the msm scaler counting Ville Syrjala
2026-04-16 15:47 ` Jani Nikula
2026-04-16 14:13 ` [PATCH i-g-t 3/3] tests/kms: Use for_each_plane_format() Ville Syrjala
2026-04-16 15:44 ` Jani Nikula [this message]
2026-04-16 15:44 ` [PATCH i-g-t 1/3] lib/kms: Introduce for_each_plane_format() Jani Nikula
2026-04-16 16:07 ` Ville Syrjälä
2026-04-16 22:39 ` ✓ i915.CI.BAT: success for series starting with [i-g-t,1/3] " Patchwork
2026-04-16 22:58 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-17 1:22 ` ✗ 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=4767f04c74476bdc0ae381fd690dab496d4668d9@intel.com \
--to=jani.nikula@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.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