From patchwork Thu May 31 17:29:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10441485 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 6506F602BD for ; Thu, 31 May 2018 17:29:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A46028EE2 for ; Thu, 31 May 2018 17:29:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EE3828F1D; Thu, 31 May 2018 17:29:46 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 E239928EE2 for ; Thu, 31 May 2018 17:29:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5344889FBC; Thu, 31 May 2018 17:29:44 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F1A06E31E; Thu, 31 May 2018 17:29:41 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 11903481-1500050 for multiple; Thu, 31 May 2018 18:29:35 +0100 Received: by haswell.alporthouse.com (sSMTP sendmail emulation); Thu, 31 May 2018 18:29:33 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Thu, 31 May 2018 18:29:32 +0100 Message-Id: <20180531172932.29575-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.17.1 X-Originating-IP: 78.156.65.138 X-Country: code=GB country="United Kingdom" ip=78.156.65.138 Subject: [Intel-gfx] [PATCH i-g-t] igt/gem_tiled_blits: Show more errors X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP glk is failing gem_tiled_blits which is very odd as it doesn't use fencing and so the tiling is all internal to the GPU. From the small number of examples seen so far, it looks like just a single bit is being flipped. Let's dump some values to see if it there is a larger pattern here. Furthermore since gem_linear_blits is also showing bitflips on glk, we can rule out the impact of tiling altogether! It just becomes a question of which piece of hw is broken... References: https://bugs.freedesktop.org/show_bug.cgi?id=106608 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- tests/gem_linear_blits.c | 11 +++++++---- tests/gem_tiled_blits.c | 14 ++++++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c index 7d05fa865..8a8d2a6cc 100644 --- a/tests/gem_linear_blits.c +++ b/tests/gem_linear_blits.c @@ -141,16 +141,19 @@ create_bo(int fd, uint32_t val) static void check_bo(int fd, uint32_t handle, uint32_t val) { + int num_errors; int i; gem_read(fd, handle, 0, linear, sizeof(linear)); + + num_errors = 0; for (i = 0; i < WIDTH*HEIGHT; i++) { - igt_assert_f(linear[i] == val, - "Expected 0x%08x, found 0x%08x " - "at offset 0x%08x\n", - val, linear[i], i * 4); + if (linear[i] != val && num_errors++ < 32) + igt_warn("[%08x] Expected 0x%08x, found 0x%08x (difference 0x%08x)\n", + i * 4, val, linear[i], val ^ linear[i]); val++; } + igt_assert_eq(num_errors, 0); } static void run_test(int fd, int count) diff --git a/tests/gem_tiled_blits.c b/tests/gem_tiled_blits.c index 0d472e3a1..26cd900b7 100644 --- a/tests/gem_tiled_blits.c +++ b/tests/gem_tiled_blits.c @@ -90,10 +90,11 @@ create_bo(uint32_t start_val) } static void -check_bo(drm_intel_bo *bo, uint32_t start_val) +check_bo(drm_intel_bo *bo, uint32_t val) { drm_intel_bo *linear_bo; uint32_t *linear; + int num_errors; int i; linear_bo = drm_intel_bo_alloc(bufmgr, "linear dst", 1024 * 1024, 4096); @@ -103,13 +104,14 @@ check_bo(drm_intel_bo *bo, uint32_t start_val) do_or_die(drm_intel_bo_map(linear_bo, 0)); linear = linear_bo->virtual; + num_errors = 0; for (i = 0; i < 1024 * 1024 / 4; i++) { - igt_assert_f(linear[i] == start_val, - "Expected 0x%08x, found 0x%08x " - "at offset 0x%08x\n", - start_val, linear[i], i * 4); - start_val++; + if (linear[i] != val && num_errors++ < 32) + igt_warn("[%08x] Expected 0x%08x, found 0x%08x (difference 0x%08x)\n", + i * 4, val, linear[i], val ^ linear[i]); + val++; } + igt_assert_eq(num_errors, 0); drm_intel_bo_unmap(linear_bo); drm_intel_bo_unreference(linear_bo);