From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: ville.syrjala@linux.intel.com, juhapekka.heikkila@gmail.com,
Swati Sharma <swati2.sharma@intel.com>
Subject: [PATCH i-g-t 2/3] tests/intel/kms_sharpness_filter: Add CRC comparison for positive tests
Date: Fri, 1 May 2026 18:07:37 +0530 [thread overview]
Message-ID: <20260501123738.2360414-3-swati2.sharma@intel.com> (raw)
In-Reply-To: <20260501123738.2360414-1-swati2.sharma@intel.com>
Add a CRC comparison that verifies the sharpness filter produces a
different CRC from a reference CRC captured with the filter disabled.
Skip the comparison for negative (invalid-*) tests since the commit
was expected to fail.
Co-developed-by: Claude Opus 4.6
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/intel/kms_sharpness_filter.c | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
index 96eec8919..062a9691c 100644
--- a/tests/intel/kms_sharpness_filter.c
+++ b/tests/intel/kms_sharpness_filter.c
@@ -418,7 +418,7 @@ static void test_sharpness_filter(data_t *data, enum test_type type)
{
igt_output_t *output = data->output;
drmModeModeInfo *mode = data->mode;
- igt_crc_t ref_crc, crc;
+ igt_crc_t ref_crc, crc, no_sharp_crc, sharp_crc;
igt_pipe_crc_t *pipe_crc = NULL;
int ret;
@@ -438,6 +438,18 @@ static void test_sharpness_filter(data_t *data, enum test_type type)
if (needs_extra_planes(type))
set_planes(data, type);
+ /*
+ * For positive tests, capture a reference CRC with the sharpness
+ * filter still disabled before applying the filter. After the filter
+ * is enabled and committed, the resulting CRC must differ.
+ */
+ if (!is_invalid_test(type)) {
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);
+ pipe_crc = igt_crtc_crc_new(data->crtc,
+ IGT_PIPE_CRC_SOURCE_AUTO);
+ igt_pipe_crc_collect_crc(pipe_crc, &no_sharp_crc);
+ }
+
set_filter_strength_on_pipe(data);
if (type == TEST_INVALID_FILTER_WITH_SCALING_MODE)
@@ -460,9 +472,14 @@ static void test_sharpness_filter(data_t *data, enum test_type type)
ret = igt_display_try_commit2(&data->display, COMMIT_ATOMIC);
}
+ if (!is_invalid_test(type)) {
+ igt_pipe_crc_collect_crc(pipe_crc, &sharp_crc);
+ igt_assert_f(!igt_check_crc_equal(&sharp_crc, &no_sharp_crc),
+ "Sharpness CRC matches reference CRC; filter had no effect on pipe %s\n",
+ igt_crtc_name(data->crtc));
+ }
+
if (type == TEST_FILTER_DPMS || type == TEST_FILTER_SUSPEND) {
- pipe_crc = igt_crtc_crc_new(data->crtc,
- IGT_PIPE_CRC_SOURCE_AUTO);
igt_pipe_crc_collect_crc(pipe_crc, &ref_crc);
if (type == TEST_FILTER_DPMS) {
@@ -479,9 +496,11 @@ static void test_sharpness_filter(data_t *data, enum test_type type)
igt_pipe_crc_collect_crc(pipe_crc, &crc);
igt_assert_crc_equal(&crc, &ref_crc);
- igt_pipe_crc_free(pipe_crc);
}
+ if (pipe_crc)
+ igt_pipe_crc_free(pipe_crc);
+
if (is_invalid_test(type))
igt_assert_eq(ret, -EINVAL);
else
--
2.25.1
next prev parent reply other threads:[~2026-05-01 12:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 12:37 [PATCH i-g-t 0/3] tests/intel/kms_sharpness_filter: Remove plane-scaler subtests Swati Sharma
2026-05-01 12:37 ` [PATCH i-g-t 1/3] " Swati Sharma
2026-05-04 8:39 ` Garg, Nemesa
2026-05-01 12:37 ` Swati Sharma [this message]
2026-05-04 9:24 ` [PATCH i-g-t 2/3] tests/intel/kms_sharpness_filter: Add CRC comparison for positive tests Garg, Nemesa
2026-05-01 12:37 ` [PATCH i-g-t 3/3] tests/intel/kms_sharpness_filter: Add invalid-filter-with-nearest-neighbor Swati Sharma
2026-05-05 9:11 ` Garg, Nemesa
2026-05-01 13:25 ` ✓ Xe.CI.BAT: success for tests/intel/kms_sharpness_filter: Remove plane-scaler subtests (rev3) Patchwork
2026-05-01 13:28 ` ✓ i915.CI.BAT: " Patchwork
2026-05-01 14:34 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-01 15:20 ` ✗ i915.CI.Full: " 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=20260501123738.2360414-3-swati2.sharma@intel.com \
--to=swati2.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.com \
--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