From patchwork Thu Apr 6 19:18:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 9668299 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 D5771602B8 for ; Thu, 6 Apr 2017 19:19:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B97C4285C4 for ; Thu, 6 Apr 2017 19:19:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD528285D8; Thu, 6 Apr 2017 19:19:20 +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, UNPARSEABLE_RELAY 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 27159285C4 for ; Thu, 6 Apr 2017 19:19:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9BC16EA2B; Thu, 6 Apr 2017 19:18:48 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3D51D6EA24 for ; Thu, 6 Apr 2017 19:18:47 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: robertfoss) with ESMTPSA id A906A265764 From: Robert Foss To: intel-gfx@lists.freedesktop.org, Tomeu Vizoso Date: Thu, 6 Apr 2017 15:18:37 -0400 Message-Id: <20170406191837.20921-1-robert.foss@collabora.com> X-Mailer: git-send-email 2.11.0.453.g787f75f05 Subject: [Intel-gfx] [PATCH i-g-t v1] igt_kms: Allow pipes with no cursor plane 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 A cursor plane may not always be available. Since there already exist variables that signal the existance or non-existance of cursor planes like pipe->plane_cursor and display->has_cursor_plane, allow the pipes that have no cursor plane. Signed-off-by: Robert Foss --- lib/igt_kms.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 5811414f..d49e152e 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1677,7 +1677,15 @@ void igt_display_init(igt_display_t *display, int drm_fd) * 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); + if (pipe->plane_cursor != -1) { + /* Cursor plane found. */ + igt_assert_eq(p, last_plane); + } else { + /* No cursor plane found. */ + igt_assert_lte(last_plane, p); + } + + pipe->n_planes = n_planes;