From patchwork Tue Feb 16 20:47:22 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: 8331811 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 26437C02AA for ; Tue, 16 Feb 2016 20:47:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 430B0202A1 for ; Tue, 16 Feb 2016 20:47:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 56A4920268 for ; Tue, 16 Feb 2016 20:47:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A4F566E884; Tue, 16 Feb 2016 20:47:41 +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 ESMTP id 0E25F6E880 for ; Tue, 16 Feb 2016 20:47:40 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 16 Feb 2016 12:47:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,456,1449561600"; d="scan'208";a="903878487" Received: from cstseng-mobl1.amr.corp.intel.com (HELO panetone.amr.corp.intel.com) ([10.252.200.181]) by fmsmga001.fm.intel.com with ESMTP; 16 Feb 2016 12:47:40 -0800 From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 16 Feb 2016 18:47:22 -0200 Message-Id: <1455655643-2535-2-git-send-email-paulo.r.zanoni@intel.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455655643-2535-1-git-send-email-paulo.r.zanoni@intel.com> References: <1455655643-2535-1-git-send-email-paulo.r.zanoni@intel.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH igt 1/2] kms_frontbuffer_tracking: don't fail fbc-farfromfence on SKL 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP SKL doesn't do the same dspaddr_offset magic as the older gens, so FBC may not be enabled on fbc-farfromfence. This is not a bug since FBC is just disabled, and this is the expected case of the current Kernel, so let's not fail the test. If/once we land the proper infrastructure to fix this in the Kernel we may revert this commit. Signed-off-by: Paulo Zanoni --- tests/kms_frontbuffer_tracking.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 9090a74..4d40e24 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -2822,9 +2822,10 @@ static void farfromfence_subtest(const struct test_mode *t) struct modeset_params *params = pick_params(t); struct draw_pattern_info *pattern = &pattern1; struct fb_region *target; - int max_height; + int max_height, assertions = 0; + int gen = intel_gen(intel_get_drm_devid(drm.fd)); - switch (intel_gen(intel_get_drm_devid(drm.fd))) { + switch (gen) { case 2: max_height = 2048; break; @@ -2836,6 +2837,11 @@ static void farfromfence_subtest(const struct test_mode *t) break; } + /* Gen 9 doesn't do the same dspaddr_offset magic as the older + * gens, so FBC may not be enabled there. */ + if (gen >= 9) + assertions |= DONT_ASSERT_FEATURE_STATUS; + prepare_subtest(t, pattern); target = pick_target(t, params); @@ -2848,13 +2854,14 @@ static void farfromfence_subtest(const struct test_mode *t) params->fb.x = 0; params->fb.y = max_height - params->mode->vdisplay; set_mode_for_params(params); - do_assertions(0); + do_assertions(assertions); for (r = 0; r < pattern->n_rects; r++) { draw_rect(pattern, target, t->method, r); update_wanted_crc(t, &pattern->crcs[t->format][r]); + /* GTT draws disable PSR. */ - do_assertions(ASSERT_PSR_DISABLED); + do_assertions(assertions | ASSERT_PSR_DISABLED); } igt_remove_fb(drm.fd, &tall_fb);