From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Swati Sharma <swati2.sharma@intel.com>
Subject: [PATCH i-g-t, v2 2/3] tests/intel/kms_sharpness_filter: Add CRC comparison for positive tests
Date: Thu, 14 May 2026 00:47:31 +0530 [thread overview]
Message-ID: <20260513191732.2420879-3-swati2.sharma@intel.com> (raw)
In-Reply-To: <20260513191732.2420879-1-swati2.sharma@intel.com>
Restructure CRC logic so that the sharpness effect check (sharp_crc
vs no_sharp_crc) is a common verification path shared by all positive
tests including DPMS and suspend.
For DPMS/suspend tests, reuse sharp_crc as the reference CRC instead
of capturing a separate ref_crc. After the power cycle, verify the CRC
still matches sharp_crc (persistence), then fall through to the common
check that verifies the filter actually had an effect.
v2: Move CRC effect check after suspend/dpms block to have a common
CRC function for all positive tests (Nemesa).
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/intel/kms_sharpness_filter.c | 34 ++++++++++++++++++++++++------
1 file changed, 27 insertions(+), 7 deletions(-)
diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
index 96eec8919..4a7fd6c75 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 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,11 +472,11 @@ static void test_sharpness_filter(data_t *data, enum test_type type)
ret = igt_display_try_commit2(&data->display, COMMIT_ATOMIC);
}
- 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 (!is_invalid_test(type)) {
+ igt_pipe_crc_collect_crc(pipe_crc, &sharp_crc);
+ }
+ if (type == TEST_FILTER_DPMS || type == TEST_FILTER_SUSPEND) {
if (type == TEST_FILTER_DPMS) {
kmstest_set_connector_dpms(data->drm_fd,
output->config.connector,
@@ -478,10 +490,18 @@ 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);
+ igt_assert_crc_equal(&crc, &sharp_crc);
}
+ if (!is_invalid_test(type)) {
+ 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 (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-13 19:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 19:17 [PATCH i-g-t, v2 0/3] tests/intel/kms_sharpness_filter: Remove plane-scaler subtests Swati Sharma
2026-05-13 19:17 ` [PATCH i-g-t, v2 1/3] " Swati Sharma
2026-05-13 19:17 ` Swati Sharma [this message]
2026-05-13 19:17 ` [PATCH i-g-t, v2 3/3] tests/intel/kms_sharpness_filter: Add invalid-filter-with-nearest-neighbor Swati Sharma
2026-05-13 21:11 ` ✗ i915.CI.BAT: failure for tests/intel/kms_sharpness_filter: Remove plane-scaler subtests (rev4) Patchwork
2026-05-13 22:01 ` ✓ Xe.CI.BAT: success " Patchwork
2026-05-14 22:26 ` ✗ 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=20260513191732.2420879-3-swati2.sharma@intel.com \
--to=swati2.sharma@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