stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings.
@ 2019-06-25  7:08 Kenneth Graunke
  2019-06-25  9:06 ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Kenneth Graunke @ 2019-06-25  7:08 UTC (permalink / raw)
  To: intel-gfx; +Cc: Kenneth Graunke, stable

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 <kenneth@whitecape.org>
---
 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)) {
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings.
  2019-06-25  7:08 [PATCH] drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings Kenneth Graunke
@ 2019-06-25  9:06 ` Chris Wilson
  2019-06-25  9:48   ` [Intel-gfx] " Mika Kuoppala
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2019-06-25  9:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: Kenneth Graunke, Chris Wilson, stable

From: Kenneth Graunke <kenneth@whitecape.org>

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.

v2: Remove the overlap with a pre-production w/a

BSpec: 9663
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index c70445adfb02..993804d09517 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -1252,8 +1252,12 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)
 		if (IS_ICL_REVID(i915, ICL_REVID_A0, ICL_REVID_B0))
 			wa_write_or(wal,
 				    GEN7_SARCHKMD,
-				    GEN7_DISABLE_DEMAND_PREFETCH |
-				    GEN7_DISABLE_SAMPLER_PREFETCH);
+				    GEN7_DISABLE_DEMAND_PREFETCH);
+
+		/* Wa_1606682166:icl */
+		wa_write_or(wal,
+			    GEN7_SARCHKMD,
+			    GEN7_DISABLE_SAMPLER_PREFETCH);
 	}
 
 	if (IS_GEN_RANGE(i915, 9, 11)) {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings.
  2019-06-25  9:06 ` Chris Wilson
@ 2019-06-25  9:48   ` Mika Kuoppala
  2019-06-25 10:13     ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Mika Kuoppala @ 2019-06-25  9:48 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: Kenneth Graunke, stable

Chris Wilson <chris@chris-wilson.co.uk> writes:

> From: Kenneth Graunke <kenneth@whitecape.org>
>
> 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.
>
> v2: Remove the overlap with a pre-production w/a
>
> BSpec: 9663
> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: stable@vger.kernel.org

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index c70445adfb02..993804d09517 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -1252,8 +1252,12 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)
>  		if (IS_ICL_REVID(i915, ICL_REVID_A0, ICL_REVID_B0))
>  			wa_write_or(wal,
>  				    GEN7_SARCHKMD,
> -				    GEN7_DISABLE_DEMAND_PREFETCH |
> -				    GEN7_DISABLE_SAMPLER_PREFETCH);
> +				    GEN7_DISABLE_DEMAND_PREFETCH);
> +
> +		/* Wa_1606682166:icl */
> +		wa_write_or(wal,
> +			    GEN7_SARCHKMD,
> +			    GEN7_DISABLE_SAMPLER_PREFETCH);
>  	}
>  
>  	if (IS_GEN_RANGE(i915, 9, 11)) {
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings.
  2019-06-25  9:48   ` [Intel-gfx] " Mika Kuoppala
@ 2019-06-25 10:13     ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2019-06-25 10:13 UTC (permalink / raw)
  To: Mika Kuoppala, intel-gfx; +Cc: Kenneth Graunke, stable

Quoting Mika Kuoppala (2019-06-25 10:48:22)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > From: Kenneth Graunke <kenneth@whitecape.org>
> >
> > 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.
> >
> > v2: Remove the overlap with a pre-production w/a
> >
> > BSpec: 9663
> > Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: stable@vger.kernel.org
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

And pushed. Thanks for the patch!
-Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-25 10:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-25  7:08 [PATCH] drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings Kenneth Graunke
2019-06-25  9:06 ` Chris Wilson
2019-06-25  9:48   ` [Intel-gfx] " Mika Kuoppala
2019-06-25 10:13     ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).