[igt-dev] [PATCH i-g-t] tests/kms_atomic_transition: Do not timeout when number of sprites is huge.
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Mon Oct 29 13:21:23 UTC 2018
We mostly care about the plane type, because sometimes the driver may
do silly things when only a cursor is enabled for example, so we reduce
the number of tests. This puts an upper bound on the number of plane
combinations being tested, which is nice for gen11.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
tests/kms_atomic_transition.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 65ff75493990..5313c5a1f594 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -131,7 +131,7 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe,
for_each_plane_on_pipe(display, pipe, plane) {
int i = plane->index;
- if (!((1 << plane->index) & mask)) {
+ if (!((1 << plane->type) & mask)) {
if (plane->values[IGT_PLANE_FB_ID])
igt_plane_set_fb(plane, NULL);
continue;
@@ -390,11 +390,15 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
drmModeModeInfo *mode, override_mode;
igt_plane_t *plane;
igt_pipe_t *pipe_obj = &display->pipes[pipe];
- uint32_t iter_max = 1 << pipe_obj->n_planes, i;
+ uint32_t iter_max, i;
struct plane_parms parms[pipe_obj->n_planes];
unsigned flags = 0;
int ret;
+ iter_max = 1 << DRM_PLANE_TYPE_OVERLAY;
+ iter_max |= 1 << DRM_PLANE_TYPE_PRIMARY;
+ iter_max |= 1 << DRM_PLANE_TYPE_CURSOR;
+
if (fencing)
prepare_fencing(display, pipe);
else
@@ -436,7 +440,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
* planes to fix this
*/
while (1) {
- wm_setup_plane(display, pipe, iter_max - 1, parms, false);
+ wm_setup_plane(display, pipe, iter_max, parms, false);
if (fencing)
igt_pipe_request_out_fence(pipe_obj);
@@ -495,7 +499,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
goto cleanup;
}
- for (i = 0; i < iter_max; i++) {
+ for (i = 0; i <= iter_max; i++) {
int n_enable_planes = igt_hweight(i);
if (type == TRANSITION_MODESET_FAST &&
@@ -521,7 +525,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
uint32_t j;
/* i -> i+1 will be done when i increases, can be skipped here */
- for (j = iter_max - 1; j > i + 1; j--) {
+ for (j = iter_max; j > i + 1; j--) {
n_enable_planes = igt_hweight(j);
if (type == TRANSITION_MODESET_FAST &&
--
2.19.1
More information about the igt-dev
mailing list