From patchwork Tue Jun 25 07:08:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Graunke X-Patchwork-Id: 11014807 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 B813314B6 for ; Tue, 25 Jun 2019 07:08:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9BBD28A89 for ; Tue, 25 Jun 2019 07:08:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E14E28AAC; Tue, 25 Jun 2019 07:08:37 +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 56BD128A89 for ; Tue, 25 Jun 2019 07:08:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26C2F89DED; Tue, 25 Jun 2019 07:08:36 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from smtp113.iad3b.emailsrvr.com (smtp113.iad3b.emailsrvr.com [146.20.161.113]) by gabe.freedesktop.org (Postfix) with ESMTPS id 38D1789DED for ; Tue, 25 Jun 2019 07:08:35 +0000 (UTC) X-Auth-ID: kenneth@whitecape.org Received: by smtp23.relay.iad3b.emailsrvr.com (Authenticated sender: kenneth-AT-whitecape.org) with ESMTPSA id EE9FFA00D8; Tue, 25 Jun 2019 03:08:33 -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 03:08:34 -0400 From: Kenneth Graunke To: intel-gfx@lists.freedesktop.org Date: Tue, 25 Jun 2019 00:08:29 -0700 Message-Id: <20190625070829.25277-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 Signed-off-by: Kenneth Graunke --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 +++++ 1 file changed, 5 insertions(+) (resending with S-o-b added...) 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)) {