summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Khajapasha <mohammed.khajapasha@intel.com>2020-07-20 20:50:42 +0530
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2020-07-21 12:58:25 +0300
commit468995d8c9b6fbd66df1bf29641f9b66cb449bff (patch)
treefc405e37dcf4ff57e2fd72a81c4d092a0de0b97f
parenta7f52de182be54a2b9f20b34f914ebd01aa7d383 (diff)
tests/kms_atomic_transition: Set modeset for enable pipes only
Set the modeset for enable pipes only by using max iteration from enable pipe count. Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
-rw-r--r--tests/kms_atomic_transition.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 656bd51e..1430884c 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -738,8 +738,8 @@ static void collect_crcs_mask(igt_pipe_crc_t **pipe_crcs, unsigned mask, igt_crc
static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblocking, bool fencing)
{
struct igt_fb fbs[2];
- int i, j;
- unsigned iter_max = 1 << display->n_pipes;
+ int i, j = 0;
+ unsigned iter_max;
igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
igt_output_t *output;
unsigned width = 0, height = 0;
@@ -764,6 +764,9 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
igt_plane_t *plane = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
drmModeModeInfo *mode = NULL;
+ /* count enable pipes to set max iteration */
+ j += 1;
+
if (is_i915_device(display->drm_fd))
pipe_crcs[i] = igt_pipe_crc_new(display->drm_fd, i, INTEL_PIPE_CRC_SOURCE_AUTO);
@@ -787,6 +790,8 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
igt_plane_set_fb(plane, NULL);
}
+ iter_max = 1 << j;
+
igt_display_commit2(display, COMMIT_ATOMIC);
for (i = 0; i < iter_max; i++) {