All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>
To: Swati Sharma <swati2.sharma@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t,v7 2/8] tests/kms_colorop_helper: Add helpers to clear colorops data
Date: Mon, 22 Dec 2025 19:33:14 +0530	[thread overview]
Message-ID: <23effb7e-7bf6-4da3-9d55-0132780278af@intel.com> (raw)
In-Reply-To: <20251219112606.1330425-3-swati2.sharma@intel.com>



On 12/19/2025 4:56 PM, Swati Sharma wrote:
> Add new helper function `clear_colorops()` to reset color operations
> to their default/bypass state. These functions:
>   - Set the colorop to bypass mode.
>   - Clear associated data blobs for CTM, LUT1D, LUT3D.
>   - Reset multiplier values where applicable.
> 
> v2: -make internal helper static (Chaitanya)
>      -rename func() to clear_colorops() (Chaitanya)
> 
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
>   tests/kms_colorop_helper.c | 30 ++++++++++++++++++++++++++++++
>   tests/kms_colorop_helper.h |  1 +
>   2 files changed, 31 insertions(+)
> 
> diff --git a/tests/kms_colorop_helper.c b/tests/kms_colorop_helper.c
> index 6869590f3..da95ec72d 100644
> --- a/tests/kms_colorop_helper.c
> +++ b/tests/kms_colorop_helper.c
> @@ -400,3 +400,33 @@ void set_color_pipeline_bypass(igt_plane_t *plane)
>   {
>   	igt_plane_set_prop_enum(plane, IGT_PLANE_COLOR_PIPELINE, "Bypass");
>   }
> +
> +static void clear_colorop(igt_display_t *display, kms_colorop_t *colorop)
> +{
> +	igt_assert(colorop->colorop);
> +	igt_colorop_set_prop_value(colorop->colorop, IGT_COLOROP_BYPASS, 1);
> +
> +	switch (colorop->type) {
> +	case KMS_COLOROP_CTM_3X4:
> +	case KMS_COLOROP_CUSTOM_LUT1D:
> +	case KMS_COLOROP_LUT3D:
> +		igt_colorop_replace_prop_blob(colorop->colorop, IGT_COLOROP_DATA, NULL, 0);
> +		break;
> +	case KMS_COLOROP_MULTIPLIER:
> +		igt_colorop_set_prop_value(colorop->colorop, IGT_COLOROP_MULTIPLIER, 1);
> +		break;
> +	case KMS_COLOROP_ENUMERATED_LUT1D:
> +	default:
> +		return;
> +	}
> +}
> +
> +void clear_colorops(igt_display_t *display,
> +		    igt_plane_t *plane,
> +		    kms_colorop_t *colorops[])
> +{
> +	int i;
> +
> +	for(i = 0; colorops[i]; i++)
> +		clear_colorop(display, colorops[i]);
> +}

We don't even need display as a parameter here and probably we should 
call the functions reset_colorop*().

With above changes made.

Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>

> diff --git a/tests/kms_colorop_helper.h b/tests/kms_colorop_helper.h
> index b807f122d..bdc812baa 100644
> --- a/tests/kms_colorop_helper.h
> +++ b/tests/kms_colorop_helper.h
> @@ -102,5 +102,6 @@ void set_color_pipeline(igt_display_t *display,
>   			kms_colorop_t *colorops[],
>   			igt_colorop_t *color_pipeline);
>   void set_color_pipeline_bypass(igt_plane_t *plane);
> +void clear_colorops(igt_display_t *display, igt_plane_t *plane, kms_colorop_t *colorops[]);
>   
>   #endif /* __KMS_COLOROP_HELPER_H__ */


  reply	other threads:[~2025-12-22 14:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19 11:25 [PATCH i-g-t, v7 0/8] Add plane color pipeline tests for Intel hardware Swati Sharma
2025-12-19 11:26 ` [PATCH i-g-t, v7 2/8] tests/kms_colorop_helper: Add helpers to clear colorops data Swati Sharma
2025-12-22 14:03   ` Borah, Chaitanya Kumar [this message]
2025-12-19 11:26 ` [PATCH i-g-t, v7 3/8] tests/kms_color: Add helper to check if pipeline contains CTM colorop Swati Sharma
2025-12-19 11:26 ` [PATCH i-g-t, v7 4/8] tests/kms_color: Add test_plane_colorops() helper to validate plane color operations Swati Sharma
2025-12-22 14:03   ` [PATCH i-g-t,v7 " Borah, Chaitanya Kumar
2025-12-19 11:26 ` [PATCH i-g-t, v7 5/8] tests/kms_color: Add helper for plane color pipeline tests Swati Sharma
2025-12-22 14:03   ` Borah, Chaitanya Kumar
2025-12-19 11:26 ` [PATCH i-g-t, v7 6/8] tests/kms_color: Add Intel plane pipeline tests with LUT1D and CTM Swati Sharma
2025-12-22 14:04   ` [PATCH i-g-t,v7 " Borah, Chaitanya Kumar
2025-12-19 11:26 ` [PATCH i-g-t, v7 7/8] tests/kms_colorop_helper: Cast pixel values to double Swati Sharma
2025-12-22 14:05   ` Borah, Chaitanya Kumar
2025-12-19 11:26 ` [PATCH i-g-t, v7 8/8] tests/kms_color: Add 3D LUT subtest for green-only output with RGB traversal Swati Sharma
2025-12-23  1:32 ` ✗ i915.CI.BAT: failure for Add plane color pipeline tests for Intel hardware (rev8) Patchwork
2025-12-23  1:34 ` ✓ Xe.CI.BAT: success " Patchwork
2025-12-23 10:32 ` ✗ 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=23effb7e-7bf6-4da3-9d55-0132780278af@intel.com \
    --to=chaitanya.kumar.borah@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=swati2.sharma@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.