From patchwork Thu Oct 26 23:51:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dhinakaran Pandiyan X-Patchwork-Id: 10028895 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 9B61C601E8 for ; Thu, 26 Oct 2017 23:55:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 854A328E8E for ; Thu, 26 Oct 2017 23:55:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 772F928EE7; Thu, 26 Oct 2017 23:55:57 +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 7005D28E8E for ; Thu, 26 Oct 2017 23:55:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C4D46E06E; Thu, 26 Oct 2017 23:55:55 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8CCB56E06E for ; Thu, 26 Oct 2017 23:55:54 +0000 (UTC) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Oct 2017 16:55:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,302,1505804400"; d="scan'208";a="165528692" Received: from dk-chv.jf.intel.com (HELO localhost.localdomain) ([10.54.75.40]) by orsmga005.jf.intel.com with ESMTP; 26 Oct 2017 16:55:53 -0700 From: Dhinakaran Pandiyan To: intel-gfx@lists.freedesktop.org Date: Thu, 26 Oct 2017 16:51:37 -0700 Message-Id: <20171026235137.5022-1-dhinakaran.pandiyan@intel.com> X-Mailer: git-send-email 2.11.0 Cc: Rodrigo Vivi , Dhinakaran Pandiyan , Paulo Zanoni Subject: [Intel-gfx] [PATCH i-g-t v2] tests/kms_frontbuffer_tracking: Skip tests when PSR cannot be enabled 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 The frontbuffer_tracking PSR tests fail if PSR cannot be activated when there is sink support. But, there are several other requirements related to mode timings that have to be satisfied before PSR can be enabled. No reason to fail these tests when PSR cannot be enabled. v2: Check for Source_OK instead of Enabled (Paulo) Cc: Paulo Zanoni Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan --- tests/kms_frontbuffer_tracking.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index a068c8af..17af4bbd 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1548,12 +1548,13 @@ static void teardown_fbc(void) { } -static bool psr_sink_has_support(void) +static bool psr_has_support(void) { char buf[256]; debugfs_read("i915_edp_psr_status", buf); - return strstr(buf, "Sink_Support: yes\n"); + return strstr(buf, "Sink_Support: yes\n") && + strstr(buf, "Source_OK: yes\n"); } static void setup_psr(void) @@ -1564,8 +1565,8 @@ static void setup_psr(void) return; } - if (!psr_sink_has_support()) { - igt_info("Can't test PSR: not supported by sink.\n"); + if (!psr_has_support()) { + igt_info("Can't test PSR: not supported.\n"); return; } psr.can_test = true;