From patchwork Thu Dec 7 09:41:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10097911 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 D21E060329 for ; Thu, 7 Dec 2017 09:41:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C48A62A3D0 for ; Thu, 7 Dec 2017 09:41:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B93312A3D2; Thu, 7 Dec 2017 09:41:38 +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 86B082A3D0 for ; Thu, 7 Dec 2017 09:41:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC3E86E7B4; Thu, 7 Dec 2017 09:41:37 +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 F1E9F6E7B4 for ; Thu, 7 Dec 2017 09:41:35 +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 9900022-1500050 for multiple; Thu, 07 Dec 2017 09:41:30 +0000 Received: by haswell.alporthouse.com (sSMTP sendmail emulation); Thu, 07 Dec 2017 09:41:29 +0000 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Thu, 7 Dec 2017 09:41:26 +0000 Message-Id: <20171207094126.19160-2-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171207094126.19160-1-chris@chris-wilson.co.uk> References: <20171207094126.19160-1-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 igt 2/2] igt/kms_frontbuffer_tracking: Access via GGTT is not guaranteed to be tracked 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 As the system may use a partial vma for a GGTT mmap, access via the GGTT mmap is not guaranteed to be tracked by FBC's fence. The rule expressed has been that any access to the frontbuffer should be followed by a fb-dirty ioctl, so always apply and expect the driver to ellide no-ops. Signed-off-by: Chris Wilson Reviewed-by: Arkadiusz Hiler --- tests/kms_frontbuffer_tracking.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index a068c8afb..1fcca87c9 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1127,8 +1127,7 @@ static void draw_rect(struct draw_pattern_info *pattern, struct fb_region *fb, fb->x + rect.x, fb->y + rect.y, rect.w, rect.h, rect.color); - if (method == IGT_DRAW_MMAP_WC) - fb_dirty_ioctl(fb, &rect); + fb_dirty_ioctl(fb, &rect); } static void draw_rect_igt_fb(struct draw_pattern_info *pattern, @@ -2132,16 +2131,10 @@ static void multidraw_subtest(const struct test_mode *t) draw_rect(pattern, target, used_method, r); - if (used_method == IGT_DRAW_MMAP_WC) + if (used_method == IGT_DRAW_MMAP_WC || + used_method == IGT_DRAW_MMAP_GTT) wc_used = true; - if (used_method == IGT_DRAW_MMAP_GTT && - wc_used) { - struct rect rect = - pattern->get_rect(target, r); - fb_dirty_ioctl(target, &rect); - } - update_wanted_crc(t, &pattern->crcs[t->format][r]);