[igt-dev] [PATCH i-g-t] tests/kms_plane_scaling: SKIP subtest if num_planes < 2
Swati Sharma
swati2.sharma at intel.com
Fri Mar 24 08:52:59 UTC 2023
Min 2 planes required for planes combo scaling test. Add that
check before executing the sub-test.
Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
---
tests/kms_plane_scaling.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 8e988058d..69df6d9aa 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -732,12 +732,16 @@ test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
{
igt_display_t *display = &d->display;
drmModeModeInfo *mode;
+ int n_planes;
cleanup_crtc(d);
igt_output_set_pipe(output, pipe);
mode = igt_output_get_mode(output);
+ n_planes = display->pipes[pipe].n_planes;
+ igt_require(n_planes >= 2);
+
switch (test_type) {
case TEST_PLANES_UPSCALE:
setup_fb(display->drm_fd, w1, h1, 1.0, 0.0, 0.0, &d->fb[1]);
@@ -759,7 +763,7 @@ test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,
igt_assert(0);
}
- for (int k = 0; k < display->pipes[pipe].n_planes - 1; k += 2) {
+ for (int k = 0; k < n_planes - 1; k += 2) {
igt_plane_t *p1, *p2;
p1 = &display->pipes[pipe].planes[k];
--
2.25.1
More information about the igt-dev
mailing list