[PATCH i-g-t 3/5] tests/kms_plane_scaling: Improvise the planes scaling BW issues
Naladala Ramanaidu
ramanaidu.naladala at intel.com
Mon Jul 15 15:46:26 UTC 2024
Anticipating bandwidth issues, we expect many tests to fail. To
address these failures, we will switch to the next lowest display
modes. Some higher display modes will be identified as insufficient
for downscaling operations on multi-plane scaling. As a solution,
we will implement a fix: when bandwidth is inadequate for current
modes, the system will automatically attempt the next lower
display mode.
Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
---
tests/kms_plane_scaling.c | 72 +++++++++++++++++++++------------------
1 file changed, 39 insertions(+), 33 deletions(-)
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 0048e6e51..1702ec8c8 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -865,43 +865,49 @@ __test_planes_scaling_combo(data_t *d, double sf_plane1,
int ret;
int w1, h1, w2, h2;
- mode = igt_output_get_mode(output);
- w1 = get_width(mode, sf_plane1);
- h1 = get_height(mode, sf_plane1);
- w2 = get_width(mode, sf_plane2);
- h2 = get_height(mode, sf_plane2);
-
- igt_plane_set_fb(p1, fb1);
- igt_plane_set_fb(p2, fb2);
+ for_each_connector_mode(output) {
+ mode = &output->config.connector->modes[j__];
+ w1 = get_width(mode, sf_plane1);
+ h1 = get_height(mode, sf_plane1);
+ w2 = get_width(mode, sf_plane2);
+ h2 = get_height(mode, sf_plane2);
+
+ igt_plane_set_fb(p1, fb1);
+ igt_plane_set_fb(p2, fb2);
+
+ switch (test_type) {
+ case TEST_PLANES_UPSCALE:
+ igt_plane_set_size(p1, mode->hdisplay, mode->vdisplay);
+ igt_plane_set_size(p2, mode->hdisplay - 20, mode->vdisplay - 20);
+ break;
+ case TEST_PLANES_DOWNSCALE:
+ igt_plane_set_size(p1, w1, h1);
+ igt_plane_set_size(p2, w2, h2);
+ break;
+ case TEST_PLANES_UPSCALE_DOWNSCALE:
+ igt_plane_set_size(p1, mode->hdisplay, mode->vdisplay);
+ igt_plane_set_size(p2, w2, h2);
+ break;
+ case TEST_PLANES_DOWNSCALE_UPSCALE:
+ igt_plane_set_size(p1, w1, h1);
+ igt_plane_set_size(p2, mode->hdisplay, mode->vdisplay);
+ break;
+ default:
+ igt_assert(0);
+ }
- switch (test_type) {
- case TEST_PLANES_UPSCALE:
- igt_plane_set_size(p1, mode->hdisplay, mode->vdisplay);
- igt_plane_set_size(p2, mode->hdisplay - 20, mode->vdisplay - 20);
- break;
- case TEST_PLANES_DOWNSCALE:
- igt_plane_set_size(p1, w1, h1);
- igt_plane_set_size(p2, w2, h2);
- break;
- case TEST_PLANES_UPSCALE_DOWNSCALE:
- igt_plane_set_size(p1, mode->hdisplay, mode->vdisplay);
- igt_plane_set_size(p2, w2, h2);
- break;
- case TEST_PLANES_DOWNSCALE_UPSCALE:
- igt_plane_set_size(p1, w1, h1);
- igt_plane_set_size(p2, mode->hdisplay, mode->vdisplay);
- break;
- default:
- igt_assert(0);
+ ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET,
+ NULL);
+ if (ret == 0)
+ break;
}
-
- ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
-
igt_plane_set_fb(p1, NULL);
igt_plane_set_fb(p2, NULL);
-
- igt_skip_on_f(ret == -EINVAL || ret == -ERANGE,
- "Scaling op not supported by driver\n");
+ igt_plane_set_position(p1, 0, 0);
+ igt_plane_set_position(p2, 0, 0);
+ cleanup_fbs(d);
+ igt_skip_on_f(ret == -ERANGE || ret == -EINVAL,
+ "Unsupported scaling factor\n");
igt_assert_eq(ret, 0);
}
--
2.43.0
More information about the igt-dev
mailing list