From patchwork Thu Oct 11 12:30:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10636589 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6AC716B1 for ; Thu, 11 Oct 2018 12:30:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA7A82B434 for ; Thu, 11 Oct 2018 12:30:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE99F2B43A; Thu, 11 Oct 2018 12:30:39 +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 BA0E12B434 for ; Thu, 11 Oct 2018 12:30:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D0BD88549; Thu, 11 Oct 2018 12:30:38 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2047788549 for ; Thu, 11 Oct 2018 12:30:37 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id z204-v6so9260003wmc.5 for ; Thu, 11 Oct 2018 05:30:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=t6A6J3VYKKKOOqB8yOThRcZ/e9QDSCQFe+a0735Cz3k=; b=J/vWrJDZLZRERWv6uQGmdQG3FfZkdPPypnd7YIw0JrSs4pWsTRGE+PekhA76XiMkzL DVn3fCQs9atkG0WktG4HCnJZV9VXqVG3+7yAYD+x4Uvddj/r83bO7tpAyMXDe6PYJTEd HOBoRtfucSOR4qsRfdOsnS+OqiRKUfdX1oe4JnFeLOUXDe7cskfCwbS2xwARB2HNSt18 RuAlkHozuC9FjkUUpeY4D4WZyn6gTs7C9IBBiFM0kxhnrB1puTRKKgiLOfImIkjKAGMo w8ZV6UHXQGya+9EbM/nkdAuYQYEJ4610KLbptm8cq59a44PkJqAGwaHcryzuynKOlBug Xekg== X-Gm-Message-State: ABuFfohO4hTaDJDWYlGXttUYucMB6wQYmBVeErySg9MzzCaaNk+FDSBV by2vG3XHFlP6dwLotlRgBD4Dfg== X-Google-Smtp-Source: ACcGV60OZcI1O1Xy/gGGwYJ3DVa1JeNfAO7gc8zxbTb8xoyg08J5KToeHuxVenLq/OOnbmP6bPx+VA== X-Received: by 2002:a1c:ce47:: with SMTP id e68-v6mr1487878wmg.45.1539261035552; Thu, 11 Oct 2018 05:30:35 -0700 (PDT) Received: from localhost.localdomain ([95.144.165.37]) by smtp.gmail.com with ESMTPSA id f7-v6sm26244551wrr.68.2018.10.11.05.30.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 05:30:35 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Thu, 11 Oct 2018 13:30:27 +0100 Message-Id: <20181011123027.12203-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 Subject: [Intel-gfx] [PATCH i-g-t] tests/gem_set_tiling_vs_pwrite: Skip on unknown swizzling 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: Intel-gfx@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin Same as in commit 78071c2fa53d ("igt/gem_tiled_partial_pwrite_pread: Check for known swizzling"), to be able to compare the bo against the test pattern we need to skip the test if the swizzling is not compatible. Signed-off-by: Tvrtko Ursulin Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102575 Cc: Chris Wilson --- Eeek confidence level low - is this correct? --- tests/gem_set_tiling_vs_pwrite.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/gem_set_tiling_vs_pwrite.c b/tests/gem_set_tiling_vs_pwrite.c index f0126b6484b7..3be908dbd103 100644 --- a/tests/gem_set_tiling_vs_pwrite.c +++ b/tests/gem_set_tiling_vs_pwrite.c @@ -42,6 +42,18 @@ IGT_TEST_DESCRIPTION("Check set_tiling vs pwrite coherency."); #define OBJECT_SIZE (1024*1024) #define TEST_STRIDE (1024*4) +static bool known_swizzling(int fd, uint32_t handle) +{ + struct drm_i915_gem_get_tiling arg = { + .handle = handle, + }; + + if (igt_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING, &arg)) + return false; + + return arg.phys_swizzle_mode == arg.swizzle_mode; +} + /** * Testcase: Check set_tiling vs pwrite coherency */ @@ -66,6 +78,12 @@ igt_simple_main gem_set_tiling(fd, handle, I915_TILING_X, TEST_STRIDE); + /* + * As we want to compare our template pattern against + * the target bo, we need consistent swizzling on both. + */ + igt_require(known_swizzling(fd, handle)); + /* touch it */ gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); *ptr = 0xdeadbeef;