From patchwork Thu Dec 22 20:42:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zanoni, Paulo R" X-Patchwork-Id: 9485633 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 81F1C60405 for ; Thu, 22 Dec 2016 20:43:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7403227D85 for ; Thu, 22 Dec 2016 20:43:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67C2927FAD; Thu, 22 Dec 2016 20:43:07 +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 1B83327D85 for ; Thu, 22 Dec 2016 20:43:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3EB146F39C; Thu, 22 Dec 2016 20:43:06 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id CED4F6F396 for ; Thu, 22 Dec 2016 20:42:21 +0000 (UTC) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP; 22 Dec 2016 12:42:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,390,1477983600"; d="scan'208";a="42582963" Received: from przanoni-mobl.amr.corp.intel.com ([10.254.184.18]) by orsmga004.jf.intel.com with ESMTP; 22 Dec 2016 12:42:20 -0800 From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 22 Dec 2016 18:42:08 -0200 Message-Id: <1482439328-32197-6-git-send-email-paulo.r.zanoni@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482439328-32197-1-git-send-email-paulo.r.zanoni@intel.com> References: <1482439328-32197-1-git-send-email-paulo.r.zanoni@intel.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH igt 6/6] kms_frontbuffer_tracking: fix compression checking 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 Ever since Kernel's "drm/i915: don't report compression when fbc is disabled" we've been wrongly assuming that the Kernel doesn't support compression information due to the fact that it doesn't print that specific line when FBC is not active. Fix this by just assuming that the Kernel supports it, allowing us to kill some more code. With this change, running a brand new kms_frontbuffer_tracking on super old Kernels will result in failures, but I suppose that's fine for IGT. Signed-off-by: Paulo Zanoni --- tests/kms_frontbuffer_tracking.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index b85f56b..a3d6f1c 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -166,14 +166,12 @@ struct { struct { bool can_test; - bool supports_compressing; bool supports_last_action; struct timespec last_action; } fbc = { .can_test = false, .supports_last_action = false, - .supports_compressing = false, }; struct { @@ -896,18 +894,6 @@ static bool fbc_wait_for_compression(void) return igt_wait(fbc_is_compressing(), 2000, 1); } -static void fbc_setup_compressing(void) -{ - char buf[128]; - - igt_debugfs_read("i915_fbc_status", buf); - - if (strstr(buf, "\nCompressing:")) - fbc.supports_compressing = true; - else - igt_info("FBC compression information not supported\n"); -} - static bool fbc_not_enough_stolen(void) { char buf[128]; @@ -1527,7 +1513,6 @@ static void setup_fbc(void) fbc.can_test = true; fbc_setup_last_action(); - fbc_setup_compressing(); } static void teardown_fbc(void) @@ -1696,8 +1681,7 @@ static int adjust_assertion_flags(const struct test_mode *t, int flags) igt_assert_f(false, "FBC disabled\n"); \ } \ \ - if (fbc.supports_compressing && \ - opt.fbc_check_compression) \ + if (opt.fbc_check_compression) \ igt_assert(fbc_wait_for_compression()); \ } else if (flags_ & ASSERT_FBC_DISABLED) { \ igt_assert(!fbc_wait_until_enabled()); \