Skip to contentSkip to conversation

lib/igt_kms: Add scaling filter property

PATCH Superseded Swati Sharma 2 participants 3 messages Jun 3, 2022

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 lib/igt_kms: Add scaling filter property

---
 lib/igt_kms.c | 8 ++++++++
 lib/igt_kms.h | 2 ++
 2 files changed, 10 insertions(+)
lib/igt_kms.c +8 -0
index a9cd754b..b70d336e 100644
@@ -581,6 +581,7 @@ const char * const igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
 	[IGT_PLANE_ALPHA] = "alpha",
 	[IGT_PLANE_ZPOS] = "zpos",
 	[IGT_PLANE_FB_DAMAGE_CLIPS] = "FB_DAMAGE_CLIPS",
+	[IGT_PLANE_SCALING_FILTER] = "SCALING_FILTER",
 };
 
 const char * const igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
@@ -593,6 +594,7 @@ const char * const igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
 	[IGT_CRTC_ACTIVE] = "ACTIVE",
 	[IGT_CRTC_OUT_FENCE_PTR] = "OUT_FENCE_PTR",
 	[IGT_CRTC_VRR_ENABLED] = "VRR_ENABLED",
+	[IGT_CRTC_SCALING_FILTER] = "SCALING_FILTER",
 };
 
 const char * const igt_connector_prop_names[IGT_NUM_CONNECTOR_PROPS] = {
@@ -2050,6 +2052,9 @@ static void igt_plane_reset(igt_plane_t *plane)
 	if (igt_plane_has_prop(plane, IGT_PLANE_FB_DAMAGE_CLIPS))
 		igt_plane_set_prop_value(plane, IGT_PLANE_FB_DAMAGE_CLIPS, 0);
 
+	if (igt_plane_has_prop(plane, IGT_PLANE_SCALING_FILTER))
+		igt_plane_set_prop_enum(plane, IGT_PLANE_SCALING_FILTER, "Default");
+
 	igt_plane_clear_prop_changed(plane, IGT_PLANE_IN_FENCE_FD);
 	plane->values[IGT_PLANE_IN_FENCE_FD] = ~0ULL;
 	plane->gem_handle = 0;
@@ -2070,6 +2075,9 @@ static void igt_pipe_reset(igt_pipe_t *pipe)
 	if (igt_pipe_obj_has_prop(pipe, IGT_CRTC_DEGAMMA_LUT))
 		igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_DEGAMMA_LUT, 0);
 
+	if (igt_pipe_obj_has_prop(pipe, IGT_CRTC_SCALING_FILTER))
+		igt_pipe_obj_set_prop_enum(pipe, IGT_CRTC_SCALING_FILTER, "Default");
+
 	pipe->out_fence_fd = -1;
 }
 
lib/igt_kms.h +2 -0
index ba0bf4d6..a334e0cf 100644
@@ -125,6 +125,7 @@ enum igt_atomic_crtc_properties {
        IGT_CRTC_ACTIVE,
        IGT_CRTC_OUT_FENCE_PTR,
        IGT_CRTC_VRR_ENABLED,
+       IGT_CRTC_SCALING_FILTER,
        IGT_NUM_CRTC_PROPS
 };
 
@@ -301,6 +302,7 @@ enum igt_atomic_plane_properties {
        IGT_PLANE_ALPHA,
        IGT_PLANE_ZPOS,
        IGT_PLANE_FB_DAMAGE_CLIPS,
+       IGT_PLANE_SCALING_FILTER,
        IGT_NUM_PLANE_PROPS
 };
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 tests/kms_scaling_filters: New IGT to validate scaling filters

SCALING_FILTER can be used either as plane scaler property or CRTC scaler property.
The value of this property can be one of the following:
Default:
Driver's default scaling filter
Nearest Neighbor:
Nearest Neighbor scaling filter
If NN is used for scaling, sharpness is preserved whereas if we use default scaling we can see blurriness at edges.

Four subtests are written upscale/downscale with NN and default scaling filters.

---
 lib/igt_kms.c               |  16 ++++
 lib/igt_kms.h               |   1 +
 tests/kms_scaling_filters.c | 182 ++++++++++++++++++++++++++++++++++++
 tests/meson.build           |   1 +
 4 files changed, 200 insertions(+)
 create mode 100644 tests/kms_scaling_filters.c
lib/igt_kms.c +16 -0
index b70d336e..e939ed41 100644
@@ -912,6 +912,22 @@ const char *kmstest_connector_status_str(int status)
 	return find_type_name(connector_status_names, status);
 }
 
+enum drm_scaling_filter {
+	DRM_SCALING_FILTER_DEFAULT,
+	DRM_SCALING_FILTER_NEAREST_NEIGHBOR,
+};
+
+static const struct type_name drm_scaling_filter[] = {
+	{ DRM_SCALING_FILTER_DEFAULT, "Default" },
+	{ DRM_SCALING_FILTER_NEAREST_NEIGHBOR, "Nearest Neighbor" },
+	{}
+};
+
+const char *kmstest_scaling_filter_str(int filter)
+{
+	return find_type_name(drm_scaling_filter, filter);
+}
+
 static const struct type_name connector_type_names[] = {
 	{ DRM_MODE_CONNECTOR_Unknown, "Unknown" },
 	{ DRM_MODE_CONNECTOR_VGA, "VGA" },
lib/igt_kms.h +1 -0
index a334e0cf..2abb3353 100644
@@ -107,6 +107,7 @@ enum igt_custom_edid_type {
 const char *kmstest_encoder_type_str(int type);
 const char *kmstest_connector_status_str(int status);
 const char *kmstest_connector_type_str(int type);
+const char *kmstest_scaling_filter_str(int filter);
 
 void kmstest_dump_mode(drmModeModeInfo *mode);
 
tests/kms_scaling_filters.c new file +182 -0

182 lines not on this page · raw message

tests/meson.build +1 -0
index fb0f1e37..dd83c068 100644
@@ -52,6 +52,7 @@ test_progs = [
 	'kms_properties',
 	'kms_rmfb',
 	'kms_rotation_crc',
+	'kms_scaling_filters',
 	'kms_scaling_modes',
 	'kms_selftest',
 	'kms_sequence',
Signature · 1 line
2.25.1
#2 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] lib/igt_kms: Add scaling filter property

In reply to Swati Sharma
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/igt_kms: Add scaling filter property
URL : https://patchwork.freedesktop.org/series/104698/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11726 -> IGTPW_7222
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_7222 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_7222, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/index.html

Participating hosts (43 -> 43)
------------------------------

Additional (1): bat-dg2-9
Missing (1): fi-rkl-11600

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_7222:

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@workarounds:
- fi-rkl-guc: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11726/fi-rkl-guc/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/fi-rkl-guc/igt@i915_selftest@[email protected]

Known issues
------------

Here are the changes found in IGTPW_7222 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [PASS][3] -> [INCOMPLETE][4] ([i915#4785])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11726/fi-hsw-4770/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/fi-hsw-4770/igt@i915_selftest@[email protected]
- fi-hsw-g3258: [PASS][5] -> [INCOMPLETE][6] ([i915#3303] / [i915#4785])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11726/fi-hsw-g3258/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/fi-hsw-g3258/igt@i915_selftest@[email protected]
- bat-dg1-5: [PASS][7] -> [DMESG-FAIL][8] ([i915#4494] / [i915#4957])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11726/bat-dg1-5/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/bat-dg1-5/igt@i915_selftest@[email protected]
- bat-dg1-6: [PASS][9] -> [DMESG-FAIL][10] ([i915#4494] / [i915#4957])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11726/bat-dg1-6/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/bat-dg1-6/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@requests:
- fi-blb-e6850: [PASS][11] -> [DMESG-FAIL][12] ([i915#4528])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11726/fi-blb-e6850/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/fi-blb-e6850/igt@i915_selftest@[email protected]

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-pnv-d510: NOTRUN -> [SKIP][13] ([fdo#109271])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/fi-pnv-d510/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- fi-cfl-8109u: [PASS][14] -> [DMESG-WARN][15] ([i915#62]) +15 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11726/fi-cfl-8109u/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/fi-cfl-8109u/igt@[email protected]

* igt@runner@aborted:
- fi-hsw-4770: NOTRUN -> [FAIL][16] ([fdo#109271] / [i915#4312] / [i915#5594])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/fi-hsw-4770/igt@[email protected]
- fi-rkl-guc: NOTRUN -> [FAIL][17] ([i915#4312])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/fi-rkl-guc/igt@[email protected]
- fi-hsw-g3258: NOTRUN -> [FAIL][18] ([fdo#109271] / [i915#4312])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/fi-hsw-g3258/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@requests:
- fi-pnv-d510: [DMESG-FAIL][19] ([i915#4528]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11726/fi-pnv-d510/igt@i915_selftest@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/fi-pnv-d510/igt@i915_selftest@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
[i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[i915#4957]: https://gitlab.freedesktop.org/drm/intel/issues/4957
[i915#5174]: https://gitlab.freedesktop.org/drm/intel/issues/5174
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5594]: https://gitlab.freedesktop.org/drm/intel/issues/5594
[i915#5763]: https://gitlab.freedesktop.org/drm/intel/issues/5763
[i915#5885]: https://gitlab.freedesktop.org/drm/intel/issues/5885
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_6505 -> IGTPW_7222

CI-20190529: 20190529
CI_DRM_11726: 74ea63ad8ffc71b8345436147517253dcabd4793 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_7222: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/index.html
IGT_6505: edb1a467fb622b23b927e28ff603fa43851fea97 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

Testlist changes
----------------

+igt@kms_scaling_filters@scaling-filter-default-downscale +igt@kms_scaling_filters@scaling-filter-default-upscale +igt@kms_scaling_filters@scaling-filter-nn-downscale +igt@kms_scaling_filters@scaling-filter-nn-upscale

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7222/index.html