From patchwork Tue Jun 25 05:55:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Graunke X-Patchwork-Id: 11014773 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 6B9B414B6 for ; Tue, 25 Jun 2019 06:11:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E79B28500 for ; Tue, 25 Jun 2019 06:11:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52D0D289B3; Tue, 25 Jun 2019 06:11:55 +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 E79D928500 for ; Tue, 25 Jun 2019 06:11:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 802D389F3B; Tue, 25 Jun 2019 06:11:53 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org X-Greylist: delayed 983 seconds by postgrey-1.36 at gabe; Tue, 25 Jun 2019 06:11:52 UTC Received: from smtp105.ord1c.emailsrvr.com (smtp105.ord1c.emailsrvr.com [108.166.43.105]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7622489F3B for ; Tue, 25 Jun 2019 06:11:52 +0000 (UTC) X-Auth-ID: kenneth@whitecape.org Received: by smtp6.relay.ord1c.emailsrvr.com (Authenticated sender: kenneth-AT-whitecape.org) with ESMTPSA id 05DA9A0147; Tue, 25 Jun 2019 01:55:27 -0400 (EDT) X-Sender-Id: kenneth@whitecape.org Received: from kirito.trees (50-39-175-242.bvtn.or.frontiernet.net [50.39.175.242]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256) by 0.0.0.0:465 (trex/5.7.12); Tue, 25 Jun 2019 01:55:28 -0400 From: Kenneth Graunke To: intel-gfx@lists.freedesktop.org Date: Mon, 24 Jun 2019 22:55:21 -0700 Message-Id: <20190625055521.5730-1-kenneth@whitecape.org> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings. 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: Kenneth Graunke , stable@vger.kernel.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP The Demand Prefetch workaround (binding table prefetching) only applies to Icelake A0/B0. But the Sampler Prefetch workaround needs to be applied to all Gen11 steppings, according to a programming note in the SARCHKMD documentation. Using the Intel Gallium driver, I have seen intermittent failures in the dEQP-GLES31.functional.copy_image.non_compressed.* tests. After applying this workaround, the tests reliably pass. BSpec: 9663 Cc: stable@vger.kernel.org --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 +++++ 1 file changed, 5 insertions(+) Hi there! We tried to work around this in the Mesa driver, and managed to do so in i965, anv, iris, but missed doing so in blorp. Oops! I'm planning on fixing that, but setting the SARCHKMD bit to shut off the broken prefetching globally seems like a good idea. That way, we make sure it works for i965, anv, iris, libva, and all the other userspace drivers. FWIW, I don't have commit access, so I would appreciate it if someone could commit this for me assuming it clears review and testing. --Ken diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index c70445adfb02..a3cb35d058a6 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -1254,6 +1254,11 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) GEN7_SARCHKMD, GEN7_DISABLE_DEMAND_PREFETCH | GEN7_DISABLE_SAMPLER_PREFETCH); + + /* Wa_1606682166:icl */ + wa_write_or(wal, + GEN7_SARCHKMD, + GEN7_DISABLE_SAMPLER_PREFETCH); } if (IS_GEN_RANGE(i915, 9, 11)) {