From patchwork Mon Jun 5 13:28:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 9766265 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 791ED60353 for ; Mon, 5 Jun 2017 13:48:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70D1226E56 for ; Mon, 5 Jun 2017 13:48:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65AE127F86; Mon, 5 Jun 2017 13:48:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 274B726E56 for ; Mon, 5 Jun 2017 13:48:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE23B89C83; Mon, 5 Jun 2017 13:48:07 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by gabe.freedesktop.org (Postfix) with ESMTPS id F107689C21 for ; Mon, 5 Jun 2017 13:48:04 +0000 (UTC) Received: from e110455-lin.cambridge.arm.com (e110455-lin.cambridge.arm.com [10.2.131.9]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id v55DSe8S023558; Mon, 5 Jun 2017 14:28:40 +0100 From: Liviu Dudau To: Petri Latvala Date: Mon, 5 Jun 2017 14:28:37 +0100 Message-Id: <20170605132840.9125-2-liviu.dudau@arm.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170605132840.9125-1-liviu.dudau@arm.com> References: <20170605132840.9125-1-liviu.dudau@arm.com> Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 1/4] lib/igt_kms: Fix erroneous assert X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Brian Starkey In trying to fix igt_display_init() for devices without cursors, I actually made matters worse. Fix the assert. Fixes: 545aa3398223 lib/igt_kms: Remove redundant cursor code Signed-off-by: Brian Starkey Reviewed-by: Arkadiusz Hiler --- lib/igt_kms.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index c77716b4..5e2ef97b 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1794,11 +1794,11 @@ void igt_display_init(igt_display_t *display, int drm_fd) */ igt_assert_eq(pipe->plane_primary, 0); - /* - * There should be no gaps. If there is, something happened - * which we can't handle (e.g. all planes are cursors). - */ - igt_assert_eq(p, last_plane); + /* Check that we filled every slot exactly once */ + if (display->has_cursor_plane) + igt_assert_eq(p, last_plane); + else + igt_assert_eq(p, n_planes); pipe->n_planes = n_planes;