public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
	<igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v2 2/4] tests/kms_color_pipeline: Run tests on all supported planes
Date: Fri, 20 Feb 2026 16:42:38 +0530	[thread overview]
Message-ID: <6adcbc66-427c-4e54-8295-b1a49c0d4df6@intel.com> (raw)
In-Reply-To: <20260219090545.340383-2-chaitanya.kumar.borah@intel.com>

On 19-02-2026 02:35 pm, Chaitanya Kumar Borah wrote:

> Extend the color pipeline tests to run on all planes of a pipe that
> exposes COLOR_PIPELINE property instead of only the primary plane.
>
> v2:
>   - Rebase
>   - Remove unused variable (Swati)
Patch LGTM

Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
>
> Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
> ---
>   tests/kms_color_pipeline.c | 57 +++++++++++++++++++++-----------------
>   1 file changed, 32 insertions(+), 25 deletions(-)
>
> diff --git a/tests/kms_color_pipeline.c b/tests/kms_color_pipeline.c
> index e7f168b10..d12874f98 100644
> --- a/tests/kms_color_pipeline.c
> +++ b/tests/kms_color_pipeline.c
> @@ -61,7 +61,7 @@ static void test_setup(data_t *data, enum pipe p)
>   	data->mode = igt_output_get_mode(data->output);
>   	igt_require(data->mode);
>   
> -	data->pipe_crc = igt_crtc_crc_new(data->primary->crtc,
> +	data->pipe_crc = igt_crtc_crc_new(crtc,
>   					  IGT_PIPE_CRC_SOURCE_AUTO);
>   
>   	igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> @@ -82,18 +82,17 @@ static bool ctm_colorop_only(kms_colorop_t *colorops[])
>   	return true;
>   }
>   
> -static bool test_plane_colorops(data_t *data,
> -				const color_t *fb_colors,
> -				const color_t *exp_colors,
> -				kms_colorop_t *colorops[])
> +static void _test_plane_colorops(data_t *data,
> +				 igt_plane_t *plane,
> +				 const color_t *fb_colors,
> +				 const color_t *exp_colors,
> +				 kms_colorop_t *colorops[])
>   {
> -	igt_plane_t *plane = data->primary;
>   	igt_display_t *display = &data->display;
>   	drmModeModeInfo *mode = data->mode;
>   	igt_colorop_t *color_pipeline;
>   	igt_crc_t crc_ref, crc_pipe;
>   	struct igt_fb fb;
> -	bool ret;
>   
>   	color_pipeline = get_color_pipeline(display, plane, colorops);
>   	igt_skip_on(!color_pipeline);
> @@ -138,7 +137,7 @@ static bool test_plane_colorops(data_t *data,
>   	igt_wait_for_vblank(plane->crtc);
>   	igt_pipe_crc_collect_crc(data->pipe_crc, &crc_pipe);
>   
> -	ret = igt_check_crc_equal(&crc_ref, &crc_pipe);
> +	igt_assert_crc_equal(&crc_ref, &crc_pipe);
>   
>   	/* Cleanup per-test state */
>   	set_color_pipeline_bypass(plane);
> @@ -147,8 +146,26 @@ static bool test_plane_colorops(data_t *data,
>   	igt_display_commit_atomic(&data->display, 0, NULL);
>   
>   	igt_remove_fb(data->drm_fd, &fb);
> +}
>   
> -	return ret;
> +static void test_plane_colorops(data_t *data, igt_crtc_t *crtc,
> +				const color_t *fb_colors,
> +				const color_t *exp_colors,
> +				kms_colorop_t *colorops[])
> +{
> +	int n_planes = crtc->n_planes;
> +	igt_output_t *output = data->output;
> +	igt_plane_t *plane;
> +
> +	for (int plane_id = 0; plane_id < n_planes; plane_id++) {
> +		plane = igt_output_get_plane(output, plane_id);
> +
> +		if (!igt_plane_has_prop(plane, IGT_PLANE_COLOR_PIPELINE))
> +			continue;
> +
> +		igt_dynamic_f("pipe-%s-plane-%u", kmstest_pipe_name(crtc->pipe), plane_id)
> +			_test_plane_colorops(data, plane, fb_colors, exp_colors, colorops);
> +	}
>   }
>   
>   static void
> @@ -284,23 +301,13 @@ run_tests_for_plane(data_t *data)
>   
>   				test_setup(data, crtc->pipe);
>   
> -				if (!igt_plane_has_prop(data->primary, IGT_PLANE_COLOR_PIPELINE)) {
> -					test_cleanup(data);
> -					continue;
> -				}
> -
> -				igt_dynamic_f("pipe-%s-%s",
> -					       igt_crtc_name(crtc),
> -					       igt_output_name(data->output)) {
> -					data->color_depth = 8;
> -					data->drm_format = DRM_FORMAT_XRGB8888;
> -
> -					igt_assert(test_plane_colorops(data,
> -								       plane_colorops_tests[i].fb_colors,
> -								       plane_colorops_tests[i].exp_colors,
> -								       plane_colorops_tests[i].colorops));
> -				}
> +				data->color_depth = 8;
> +				data->drm_format = DRM_FORMAT_XRGB8888;
>   
> +				test_plane_colorops(data, crtc,
> +						    plane_colorops_tests[i].fb_colors,
> +						    plane_colorops_tests[i].exp_colors,
> +						    plane_colorops_tests[i].colorops);
>   				test_cleanup(data);
>   			}
>   		}

  reply	other threads:[~2026-02-20 11:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-19  9:05 [PATCH i-g-t v2 1/4] tests/kms_color_pipeline: use atomic commit helper consistently Chaitanya Kumar Borah
2026-02-19  9:05 ` [PATCH i-g-t v2 2/4] tests/kms_color_pipeline: Run tests on all supported planes Chaitanya Kumar Borah
2026-02-20 11:12   ` Sharma, Swati2 [this message]
2026-02-19  9:05 ` [PATCH i-g-t v2 3/4] tests/kms_color_pipeline: Disable pipe color properties in test setup Chaitanya Kumar Borah
2026-02-19  9:05 ` [PATCH i-g-t v2 4/4] tests/kms_color_pipeline: collect reference CRC once per pipe Chaitanya Kumar Borah
2026-02-20 11:13   ` Sharma, Swati2
2026-02-19 11:52 ` ✓ Xe.CI.BAT: success for series starting with [i-g-t,v2,1/4] tests/kms_color_pipeline: use atomic commit helper consistently Patchwork
2026-02-19 12:02 ` ✓ i915.CI.BAT: " Patchwork
2026-02-19 15:11 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-02-19 16:16 ` ✗ i915.CI.Full: " Patchwork
2026-02-23  7:40 ` ✓ i915.CI.Full: success " 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=6adcbc66-427c-4e54-8295-b1a49c0d4df6@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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