From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 834E06E25D for ; Thu, 25 Jun 2020 06:37:18 +0000 (UTC) From: Mohammed Khajapasha Date: Thu, 25 Jun 2020 12:05:51 +0530 Message-Id: <20200625063551.26622-8-mohammed.khajapasha@intel.com> In-Reply-To: <20200625063551.26622-1-mohammed.khajapasha@intel.com> References: <20200617180354.17770-1-mohammed.khajapasha@intel.com> <20200625063551.26622-1-mohammed.khajapasha@intel.com> MIME-Version: 1.0 Subject: [igt-dev] [PATCH i-g-t v3 7/7] tests/kms_atomic_transition: Set modeset for enable pipes only List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: arkadiusz.hiler@intel.com, igt-dev@lists.freedesktop.org List-ID: Set the modeset for enable pipes only by using max iteration from enable pipe count. Signed-off-by: Mohammed Khajapasha --- tests/kms_atomic_transition.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c index 754a4969..8c1c1d93 100644 --- a/tests/kms_atomic_transition.c +++ b/tests/kms_atomic_transition.c @@ -737,8 +737,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; @@ -762,6 +762,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); @@ -785,6 +788,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++) { -- 2.24.1 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev