From patchwork Tue Apr 25 16:45:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Starkey X-Patchwork-Id: 9698765 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 BFFA16020A for ; Tue, 25 Apr 2017 16:45:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEF9428636 for ; Tue, 25 Apr 2017 16:45:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3DAF28660; Tue, 25 Apr 2017 16:45:24 +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 3AB2728636 for ; Tue, 25 Apr 2017 16:45:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0801B6E5A7; Tue, 25 Apr 2017 16:45:22 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by gabe.freedesktop.org (Postfix) with ESMTP id D01356E5AF for ; Tue, 25 Apr 2017 16:45:20 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B4D371688; Tue, 25 Apr 2017 09:45:20 -0700 (PDT) Received: from e106950-lin.cambridge.arm.com (e106950-lin.cambridge.arm.com [10.2.139.56]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CD6763F4FF; Tue, 25 Apr 2017 09:45:19 -0700 (PDT) From: Brian Starkey To: intel-gfx@lists.freedesktop.org Date: Tue, 25 Apr 2017 17:45:07 +0100 Message-Id: <1493138713-2319-2-git-send-email-brian.starkey@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1493138713-2319-1-git-send-email-brian.starkey@arm.com> References: <1493138713-2319-1-git-send-email-brian.starkey@arm.com> Cc: liviu.dudau@arm.com Subject: [Intel-gfx] [PATCH i-g-t RESEND 1/7] 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 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 --- 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 9bfa0e1d0695..5837a9f112a6 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1789,11 +1789,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;