From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: chaitanya.kumar.borah@intel.com, Swati Sharma <swati2.sharma@intel.com>
Subject: [PATCH i-g-t, v8 2/5] tests/kms_colorop_helper: Add helpers to clear colorops data
Date: Tue, 30 Dec 2025 12:15:49 +0530 [thread overview]
Message-ID: <20251230064552.22909-3-swati2.sharma@intel.com> (raw)
In-Reply-To: <20251230064552.22909-1-swati2.sharma@intel.com>
Add new helper function 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)
v3: -remove unused var (Chaitanya)
-rename func name to reset_colorops() (Chaitanya)
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
---
tests/kms_colorop_helper.c | 28 ++++++++++++++++++++++++++++
tests/kms_colorop_helper.h | 1 +
2 files changed, 29 insertions(+)
diff --git a/tests/kms_colorop_helper.c b/tests/kms_colorop_helper.c
index 6869590f3..76728b47b 100644
--- a/tests/kms_colorop_helper.c
+++ b/tests/kms_colorop_helper.c
@@ -400,3 +400,31 @@ void set_color_pipeline_bypass(igt_plane_t *plane)
{
igt_plane_set_prop_enum(plane, IGT_PLANE_COLOR_PIPELINE, "Bypass");
}
+
+static void reset_colorop(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 reset_colorops(kms_colorop_t *colorops[])
+{
+ int i;
+
+ for(i = 0; colorops[i]; i++)
+ reset_colorop(colorops[i]);
+}
diff --git a/tests/kms_colorop_helper.h b/tests/kms_colorop_helper.h
index b807f122d..2ded22c8f 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 reset_colorops(kms_colorop_t *colorops[]);
#endif /* __KMS_COLOROP_HELPER_H__ */
--
2.25.1
next prev parent reply other threads:[~2025-12-30 6:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 6:45 [PATCH i-g-t, v8 0/5] Add plane color pipeline tests for Intel hardware Swati Sharma
2025-12-30 6:45 ` Swati Sharma [this message]
2025-12-30 6:45 ` [PATCH i-g-t, v8 3/5] tests/kms_colorop_helper: Cast pixel values to double Swati Sharma
2025-12-30 6:45 ` [PATCH i-g-t, v8 4/5] tests/kms_color_pipeline: Add Intel plane pipeline tests with LUT1D and CTM Swati Sharma
2026-01-05 7:47 ` [PATCH i-g-t,v8 " Borah, Chaitanya Kumar
2025-12-30 6:45 ` [PATCH i-g-t, v8 5/5] tests/kms_color_pipeline: Add 3D LUT subtest for green-only output with RGB traversal Swati Sharma
2025-12-30 7:16 ` ✓ Xe.CI.BAT: success for Add plane color pipeline tests for Intel hardware (rev9) Patchwork
2025-12-30 7:46 ` ✓ i915.CI.BAT: " Patchwork
2025-12-30 8:51 ` ✓ Xe.CI.Full: " Patchwork
2025-12-30 9:26 ` ✗ 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=20251230064552.22909-3-swati2.sharma@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