From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Swati Sharma" <swati2.sharma@intel.com>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Nemesa Garg" <nemesa.garg@intel.com>
Subject: [PATCH i-g-t, v2 3/3] tests/intel/kms_sharpness_filter: Add invalid-filter-with-nearest-neighbor
Date: Thu, 14 May 2026 00:47:32 +0530 [thread overview]
Message-ID: <20260513191732.2420879-4-swati2.sharma@intel.com> (raw)
In-Reply-To: <20260513191732.2420879-1-swati2.sharma@intel.com>
Add a negative subtest that sets the CRTC scaling filter to
"Nearest Neighbor" together with the content adaptive sharpness
filter. The driver must reject this combination since the pipe
scaler cannot run the sharpness filter and Nearest Neighbor
scaling at the same time.
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Co-developed-by: Claude Opus 4.6
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Nemesa Garg <nemesa.garg@intel.com>
---
tests/intel/kms_sharpness_filter.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
index 4a7fd6c75..353a9a292 100644
--- a/tests/intel/kms_sharpness_filter.c
+++ b/tests/intel/kms_sharpness_filter.c
@@ -59,6 +59,11 @@
* Description: Negative check for content adaptive sharpness filter
* when scaling mode is already enabled and attempt is made to enable
* sharpness filter.
+ *
+ * SUBTEST: invalid-filter-with-nearest-neighbor
+ * Description: Negative check for content adaptive sharpness filter when
+ * the pipe scaling filter is set to Nearest Neighbor and an
+ * attempt is made to enable the sharpness filter.
*/
IGT_TEST_DESCRIPTION("Test to validate content adaptive sharpness filter");
@@ -94,6 +99,7 @@ enum test_type {
TEST_INVALID_FILTER_WITH_PLANE,
TEST_INVALID_PLANE_WITH_FILTER,
TEST_INVALID_FILTER_WITH_SCALING_MODE,
+ TEST_INVALID_FILTER_WITH_NEAREST_NEIGHBOR,
};
const int filter_strength_list[] = {
@@ -212,6 +218,14 @@ static const struct subtest_entry {
.filter_strength = DEFAULT_FILTER_STRENGTH,
.iter = ITER_SCALING_MODE,
},
+ {
+ .name = "invalid-filter-with-nearest-neighbor",
+ .describe = "Negative check for content adaptive sharpness filter "
+ "when the pipe scaling filter is set to Nearest Neighbor "
+ "and an attempt is made to enable the sharpness filter.",
+ .type = TEST_INVALID_FILTER_WITH_NEAREST_NEIGHBOR,
+ .filter_strength = DEFAULT_FILTER_STRENGTH,
+ },
};
typedef struct {
@@ -394,6 +408,7 @@ static bool is_invalid_test(enum test_type type)
case TEST_INVALID_FILTER_WITH_PLANE:
case TEST_INVALID_PLANE_WITH_FILTER:
case TEST_INVALID_FILTER_WITH_SCALING_MODE:
+ case TEST_INVALID_FILTER_WITH_NEAREST_NEIGHBOR:
return true;
default:
return false;
@@ -435,6 +450,11 @@ static void test_sharpness_filter(data_t *data, enum test_type type)
if (type == TEST_INVALID_FILTER_WITH_SCALING_MODE)
igt_require_f(has_scaling_mode(output), "No connecter scaling mode found on %s\n", output->name);
+ if (type == TEST_INVALID_FILTER_WITH_NEAREST_NEIGHBOR)
+ igt_require_f(igt_crtc_has_prop(data->crtc, IGT_CRTC_SCALING_FILTER),
+ "No CRTC SCALING_FILTER property on pipe %s\n",
+ igt_crtc_name(data->crtc));
+
if (needs_extra_planes(type))
set_planes(data, type);
@@ -452,6 +472,10 @@ static void test_sharpness_filter(data_t *data, enum test_type type)
set_filter_strength_on_pipe(data);
+ if (type == TEST_INVALID_FILTER_WITH_NEAREST_NEIGHBOR)
+ igt_crtc_set_prop_enum(data->crtc, IGT_CRTC_SCALING_FILTER,
+ "Nearest Neighbor");
+
if (type == TEST_INVALID_FILTER_WITH_SCALING_MODE)
ret = igt_display_try_commit_atomic(&data->display, 0, NULL);
else
@@ -528,6 +552,7 @@ static const char * const test_type_names[] = {
[TEST_INVALID_FILTER_WITH_PLANE] = "invalid-filter-with-plane",
[TEST_INVALID_PLANE_WITH_FILTER] = "invalid-plane-with-filter",
[TEST_INVALID_FILTER_WITH_SCALING_MODE] = NULL,
+ [TEST_INVALID_FILTER_WITH_NEAREST_NEIGHBOR] = "invalid-filter-with-nearest-neighbor",
};
static void build_test_suffix(data_t *data, enum test_type type,
--
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 ` [PATCH i-g-t, v2 2/3] tests/intel/kms_sharpness_filter: Add CRC comparison for positive tests Swati Sharma
2026-05-13 19:17 ` Swati Sharma [this message]
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-4-swati2.sharma@intel.com \
--to=swati2.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nemesa.garg@intel.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