public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Kenneth Graunke <kenneth@whitecape.org>
To: intel-gfx@lists.freedesktop.org
Cc: Kenneth Graunke <kenneth@whitecape.org>, stable@vger.kernel.org
Subject: [PATCH] drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings.
Date: Mon, 24 Jun 2019 22:55:21 -0700	[thread overview]
Message-ID: <20190625055521.5730-1-kenneth@whitecape.org> (raw)

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)) {
-- 
2.22.0

             reply	other threads:[~2019-06-25  5:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25  5:55 Kenneth Graunke [this message]
2019-06-25  6:26 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings Patchwork
2019-06-25  6:47 ` ✗ Fi.CI.BAT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-06-25  7:08 [PATCH] " Kenneth Graunke
2019-06-25  9:06 ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190625055521.5730-1-kenneth@whitecape.org \
    --to=kenneth@whitecape.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox