From patchwork Tue Feb 12 20:57:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10808669 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 E615913B4 for ; Tue, 12 Feb 2019 20:57:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4AE52981D for ; Tue, 12 Feb 2019 20:57:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8F432ABF6; Tue, 12 Feb 2019 20:57:56 +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 6097D2981D for ; Tue, 12 Feb 2019 20:57:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F00F6E6FA; Tue, 12 Feb 2019 20:57:54 +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 9CBC96E6FA; Tue, 12 Feb 2019 20:57:52 +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 15556276-1500050 for multiple; Tue, 12 Feb 2019 20:57:47 +0000 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Tue, 12 Feb 2019 20:57:40 +0000 Message-Id: <20190212205740.20368-2-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190212205740.20368-1-chris@chris-wilson.co.uk> References: <20190212205740.20368-1-chris@chris-wilson.co.uk> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t 2/2] i915/gem_eio: Allow older platforms more leniency in reset latency 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 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Older platforms need to clobber the display around a reset (incl. a modeset to off, and a modeset back on), which can be much slower than the reset itself. Give these platforms (gen2-4) some leniency and allow them a higher limit before declaring them a failure. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- tests/i915/gem_eio.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c index bd5266104..ac85a2eff 100644 --- a/tests/i915/gem_eio.c +++ b/tests/i915/gem_eio.c @@ -259,7 +259,7 @@ static void check_wait(int fd, uint32_t bo, unsigned int wait, igt_stats_t *st) static void check_wait_elapsed(int fd, igt_stats_t *st) { - double med, max; + double med, max, limit; igt_info("Completed %d resets, wakeups took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms)\n", st->n_values, @@ -272,15 +272,24 @@ static void check_wait_elapsed(int fd, igt_stats_t *st) if (st->n_values < 9) return; /* too few for stable median */ + /* + * Older platforms need to reset the display (incl. modeset to off, + * modeset back on) around resets, so may take a lot longer. + */ + limit = 250e6; + if (intel_gen(intel_get_drm_devid(fd)) < 5) + limit += 300e6; /* guestimate for 2x worstcase modeset */ + med = igt_stats_get_median(st); max = igt_stats_get_max(st); - igt_assert_f(med < 250e6 && max < 1250e6, - "Wake up following reset+wedge took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms)\n", + igt_assert_f(med < limit && max < 5 * limit, + "Wake up following reset+wedge took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms); limit set to %.0fms on average and %.0fms maximum\n", igt_stats_get_mean(st)*1e-6, igt_stats_get_std_deviation(st)*1e-6, igt_stats_get_min(st)*1e-6, igt_stats_get_median(st)*1e-6, - igt_stats_get_max(st)*1e-6); + igt_stats_get_max(st)*1e-6, + limit*1e-6, limit*5e-6); } static void __test_banned(int fd)