From patchwork Thu May 17 09:56:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10406235 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 3ED4360247 for ; Thu, 17 May 2018 09:56:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C6DC28A17 for ; Thu, 17 May 2018 09:56:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1ECAD28A1C; Thu, 17 May 2018 09:56:19 +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 8DA9D28A17 for ; Thu, 17 May 2018 09:56:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E1246E751; Thu, 17 May 2018 09:56:17 +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 0B7466E751 for ; Thu, 17 May 2018 09:56:15 +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 11733798-1500050 for multiple; Thu, 17 May 2018 10:56:07 +0100 Received: by haswell.alporthouse.com (sSMTP sendmail emulation); Thu, 17 May 2018 10:56:06 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Thu, 17 May 2018 10:56:05 +0100 Message-Id: <20180517095605.25331-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180517082330.32760-3-chris@chris-wilson.co.uk> References: <20180517082330.32760-3-chris@chris-wilson.co.uk> 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/kms_frontbuffer_tracking: Skip over IGT_DRAW_BLT when there's no BLT 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: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP If the blitter is not available, we cannot use it as a source for dirty rectangles. We shall have to rely on the other engines to create GPU dirty instead. v2: Try using lots of subgroup+fixtures Signed-off-by: Chris Wilson --- tests/kms_frontbuffer_tracking.c | 58 ++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 8754cc461..64f253f00 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -3160,6 +3160,9 @@ static void basic_subtest(const struct test_mode *t) fb1 = params->primary.fb; for (r = 0, method = 0; method < IGT_DRAW_METHOD_COUNT; method++, r++) { + if (method == IGT_DRAW_BLT && ! gem_has_blitter(drm.fd)) + continue; + if (r == pattern->n_rects) { params->primary.fb = (params->primary.fb == fb1) ? &fb2 : fb1; @@ -3380,10 +3383,11 @@ static const char *flip_str(enum flip_type flip) continue; \ if (!opt.show_hidden && t.fbs == FBS_SHARED && \ (t.plane == PLANE_CUR || t.plane == PLANE_SPR)) \ - continue; + continue; \ + igt_subtest_group { -#define TEST_MODE_ITER_END } } } } } } +#define TEST_MODE_ITER_END } } } } } } } int main(int argc, char *argv[]) { @@ -3431,6 +3435,10 @@ int main(int argc, char *argv[]) } TEST_MODE_ITER_BEGIN(t) + igt_fixture { + if (t.method == IGT_DRAW_BLT) + gem_require_blitter(drm.fd); + } igt_subtest_f("%s-%s-%s-%s-%s-draw-%s", feature_str(t.feature), pipes_str(t.pipes), @@ -3447,6 +3455,11 @@ int main(int argc, char *argv[]) (!opt.show_hidden && t.method != IGT_DRAW_BLT)) continue; + igt_fixture { + if (t.method == IGT_DRAW_BLT) + gem_require_blitter(drm.fd); + } + for (t.flip = 0; t.flip < FLIP_COUNT; t.flip++) igt_subtest_f("%s-%s-%s-%s-%sflip-%s", feature_str(t.feature), @@ -3465,6 +3478,11 @@ int main(int argc, char *argv[]) (t.feature & FEATURE_FBC) == 0) continue; + igt_fixture { + if (t.method == IGT_DRAW_BLT) + gem_require_blitter(drm.fd); + } + igt_subtest_f("%s-%s-%s-fliptrack", feature_str(t.feature), pipes_str(t.pipes), @@ -3478,6 +3496,11 @@ int main(int argc, char *argv[]) t.plane == PLANE_PRI) continue; + igt_fixture { + if (t.method == IGT_DRAW_BLT) + gem_require_blitter(drm.fd); + } + igt_subtest_f("%s-%s-%s-%s-%s-move", feature_str(t.feature), pipes_str(t.pipes), @@ -3501,6 +3524,11 @@ int main(int argc, char *argv[]) t.plane != PLANE_SPR) continue; + igt_fixture { + if (t.method == IGT_DRAW_BLT) + gem_require_blitter(drm.fd); + } + igt_subtest_f("%s-%s-%s-%s-%s-fullscreen", feature_str(t.feature), pipes_str(t.pipes), @@ -3517,6 +3545,11 @@ int main(int argc, char *argv[]) (!opt.show_hidden && t.fbs != FBS_INDIVIDUAL)) continue; + igt_fixture { + if (t.method == IGT_DRAW_BLT) + gem_require_blitter(drm.fd); + } + igt_subtest_f("%s-%s-%s-%s-multidraw", feature_str(t.feature), pipes_str(t.pipes), @@ -3533,6 +3566,11 @@ int main(int argc, char *argv[]) t.method != IGT_DRAW_MMAP_GTT) continue; + igt_fixture { + if (t.method == IGT_DRAW_BLT) + gem_require_blitter(drm.fd); + } + igt_subtest_f("%s-farfromfence", feature_str(t.feature)) farfromfence_subtest(&t); TEST_MODE_ITER_END @@ -3544,6 +3582,11 @@ int main(int argc, char *argv[]) t.fbs != FBS_INDIVIDUAL) continue; + igt_fixture { + if (t.method == IGT_DRAW_BLT) + gem_require_blitter(drm.fd); + } + for (t.format = 0; t.format < FORMAT_COUNT; t.format++) { /* Skip what we already tested. */ if (t.format == FORMAT_DEFAULT) @@ -3563,6 +3606,12 @@ int main(int argc, char *argv[]) t.plane != PLANE_PRI || t.method != IGT_DRAW_BLT) continue; + + igt_fixture { + if (t.method == IGT_DRAW_BLT) + gem_require_blitter(drm.fd); + } + igt_subtest_f("%s-%s-scaledprimary", feature_str(t.feature), fbs_str(t.fbs)) @@ -3577,6 +3626,11 @@ int main(int argc, char *argv[]) t.method != IGT_DRAW_BLT) continue; + igt_fixture { + if (t.method == IGT_DRAW_BLT) + gem_require_blitter(drm.fd); + } + igt_subtest_f("%s-modesetfrombusy", feature_str(t.feature)) modesetfrombusy_subtest(&t);