public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
@ 2016-07-20 11:26 Mika Kuoppala
  2016-07-20 11:26 ` [PATCH 2/2] drm/i915/gen9: Add WaDisableGatherAtSetShaderCommonSlice Mika Kuoppala
  2016-07-20 12:05 ` ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang Patchwork
  0 siblings, 2 replies; 7+ messages in thread
From: Mika Kuoppala @ 2016-07-20 11:26 UTC (permalink / raw)
  To: intel-gfx; +Cc: stable

From: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Add this workaround to prevent hang when in place compression
is used.

References: HSD#2135774
Cc: stable@vger.kernel.org
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h         |  2 ++
 drivers/gpu/drm/i915/i915_reg.h         |  3 +++
 drivers/gpu/drm/i915/intel_ringbuffer.c | 14 ++++++++++++++
 3 files changed, 19 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index e163a9487750..7f1003046caa 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2580,6 +2580,8 @@ struct drm_i915_cmd_table {
 #define SKL_REVID_D0		0x3
 #define SKL_REVID_E0		0x4
 #define SKL_REVID_F0		0x5
+#define SKL_REVID_G0		0x6
+#define SKL_REVID_H0		0x7
 
 #define IS_SKL_REVID(p, since, until) (IS_SKYLAKE(p) && IS_REVID(p, since, until))
 
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 8bfde75789f6..ce14fe09d962 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1686,6 +1686,9 @@ enum skl_disp_power_wells {
 
 #define GEN7_TLB_RD_ADDR	_MMIO(0x4700)
 
+#define GEN9_GAMT_ECO_REG_RW_IA _MMIO(0x4ab0)
+#define   GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS	(1<<18)
+
 #define GAMT_CHKN_BIT_REG	_MMIO(0x4ab8)
 #define   GAMT_CHKN_DISABLE_DYNAMIC_CREDIT_SHARING	(1<<28)
 
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index af0bd71e3a36..75cede0147f7 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1104,6 +1104,11 @@ static int skl_init_workarounds(struct intel_engine_cs *engine)
 	/* WaDisableGafsUnitClkGating:skl */
 	WA_SET_BIT(GEN7_UCGCTL4, GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE);
 
+	/* WaInPlaceDecompressionHang:skl */
+	if (IS_SKL_REVID(dev_priv, SKL_REVID_H0, REVID_FOREVER))
+		WA_SET_BIT(GEN9_GAMT_ECO_REG_RW_IA,
+			   GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS);
+
 	/* WaDisableLSQCROPERFforOCL:skl */
 	ret = wa_ring_whitelist_reg(engine, GEN8_L3SQCREG4);
 	if (ret)
@@ -1173,6 +1178,11 @@ static int bxt_init_workarounds(struct intel_engine_cs *engine)
 		WA_SET_BIT_MASKED(COMMON_SLICE_CHICKEN2,
 				  GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION);
 
+	/* WaInPlaceDecompressionHang:bxt */
+	if (IS_BXT_REVID(dev_priv, BXT_REVID_C0, REVID_FOREVER))
+		WA_SET_BIT(GEN9_GAMT_ECO_REG_RW_IA,
+			   GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS);
+
 	return 0;
 }
 
@@ -1220,6 +1230,10 @@ static int kbl_init_workarounds(struct intel_engine_cs *engine)
 		GEN7_HALF_SLICE_CHICKEN1,
 		GEN7_SBE_SS_CACHE_DISPATCH_PORT_SHARING_DISABLE);
 
+	/* WaInPlaceDecompressionHang:kbl */
+	WA_SET_BIT(GEN9_GAMT_ECO_REG_RW_IA,
+		   GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS);
+
 	/* WaDisableLSQCROPERFforOCL:kbl */
 	ret = wa_ring_whitelist_reg(engine, GEN8_L3SQCREG4);
 	if (ret)
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 2/2] drm/i915/gen9: Add WaDisableGatherAtSetShaderCommonSlice
  2016-07-20 11:26 [PATCH 1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang Mika Kuoppala
@ 2016-07-20 11:26 ` Mika Kuoppala
  2016-07-20 12:05 ` ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang Patchwork
  1 sibling, 0 replies; 7+ messages in thread
From: Mika Kuoppala @ 2016-07-20 11:26 UTC (permalink / raw)
  To: intel-gfx; +Cc: Matthew Auld

From: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Add WaDisableGatherAtSetShaderCommonSlice for all gen9 as stated
by bspec. The bspec told to put this workaround to the per ctx bb.
Initial implementation and subsequent review were done based on
bspec. Arun raised a suspicion that this would belong to indirect bb
instead and he conducted more throughout investigation on the matter
and indeed the documentation was wrong.

v2: Move to indirect_ctx wa bb, as it is correct place (Arun)

References: HSD#2135817
Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com> (v1)
Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h  | 1 +
 drivers/gpu/drm/i915/intel_lrc.c | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index ce14fe09d962..f031231e89e6 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -6132,6 +6132,7 @@ enum {
 # define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC	((1<<10) | (1<<26))
 # define GEN9_RHWO_OPTIMIZATION_DISABLE		(1<<14)
 #define COMMON_SLICE_CHICKEN2			_MMIO(0x7014)
+# define GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE (1<<12)
 # define GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION (1<<8)
 # define GEN8_CSC2_SBE_VUE_CACHE_CONSERVATIVE	(1<<0)
 
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 860dba2cf7b3..afd76591bbb8 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1256,6 +1256,13 @@ static int gen9_init_indirectctx_bb(struct intel_engine_cs *engine,
 		return ret;
 	index = ret;
 
+	/* WaDisableGatherAtSetShaderCommonSlice:skl,bxt,kbl */
+	wa_ctx_emit(batch, index, MI_LOAD_REGISTER_IMM(1));
+	wa_ctx_emit_reg(batch, index, COMMON_SLICE_CHICKEN2);
+	wa_ctx_emit(batch, index, _MASKED_BIT_DISABLE(
+			    GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE));
+	wa_ctx_emit(batch, index, MI_NOOP);
+
 	/* WaClearSlmSpaceAtContextSwitch:kbl */
 	/* Actual scratch location is at 128 bytes offset */
 	if (IS_KBL_REVID(engine->i915, 0, KBL_REVID_A0)) {
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
  2016-07-20 11:26 [PATCH 1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang Mika Kuoppala
  2016-07-20 11:26 ` [PATCH 2/2] drm/i915/gen9: Add WaDisableGatherAtSetShaderCommonSlice Mika Kuoppala
@ 2016-07-20 12:05 ` Patchwork
  2016-07-20 12:49   ` Joonas Lahtinen
  1 sibling, 1 reply; 7+ messages in thread
From: Patchwork @ 2016-07-20 12:05 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
URL   : https://patchwork.freedesktop.org/series/10088/
State : failure

== Summary ==

Series 10088v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/10088/revisions/1/mbox

Test gem_exec_suspend:
        Subgroup basic-s3:
                pass       -> INCOMPLETE (fi-hsw-i7-4770k)
Test gem_sync:
        Subgroup basic-store-each:
                pass       -> FAIL       (ro-bdw-i7-5600u)

fi-hsw-i7-4770k  total:107  pass:91   dwarn:0   dfail:0   fail:0   skip:15 
fi-kbl-qkkr      total:244  pass:180  dwarn:26  dfail:1   fail:10  skip:27 
fi-skl-i5-6260u  total:244  pass:224  dwarn:0   dfail:0   fail:8   skip:12 
fi-snb-i7-2600   total:244  pass:196  dwarn:0   dfail:0   fail:8   skip:40 
ro-bdw-i5-5250u  total:244  pass:219  dwarn:4   dfail:0   fail:8   skip:13 
ro-bdw-i7-5600u  total:244  pass:203  dwarn:0   dfail:0   fail:9   skip:32 
ro-bsw-n3050     total:218  pass:173  dwarn:0   dfail:0   fail:2   skip:42 
ro-byt-n2820     total:244  pass:197  dwarn:0   dfail:0   fail:9   skip:38 
ro-hsw-i3-4010u  total:244  pass:212  dwarn:0   dfail:0   fail:8   skip:24 
ro-hsw-i7-4770r  total:244  pass:212  dwarn:0   dfail:0   fail:8   skip:24 
ro-ilk-i7-620lm  total:244  pass:172  dwarn:0   dfail:0   fail:9   skip:63 
ro-ilk1-i5-650   total:239  pass:172  dwarn:0   dfail:0   fail:9   skip:58 
ro-ivb-i7-3770   total:244  pass:203  dwarn:0   dfail:0   fail:8   skip:33 
ro-skl3-i5-6260u total:244  pass:224  dwarn:0   dfail:0   fail:8   skip:12 
ro-snb-i7-2620M  total:244  pass:193  dwarn:0   dfail:0   fail:9   skip:42 
fi-skl-i7-6700k failed to connect after reboot
ro-bdw-i7-5557U failed to connect after reboot

Results at /archive/results/CI_IGT_test/RO_Patchwork_1542/

cafe8a2 drm-intel-nightly: 2016y-07m-20d-08h-45m-03s UTC integration manifest
48c99d2 drm/i915/gen9: Add WaDisableGatherAtSetShaderCommonSlice
a5e57a3 drm/i915/gen9: Add WaInPlaceDecompressionHang

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
  2016-07-20 12:05 ` ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang Patchwork
@ 2016-07-20 12:49   ` Joonas Lahtinen
  2016-07-20 12:50     ` Chris Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Joonas Lahtinen @ 2016-07-20 12:49 UTC (permalink / raw)
  To: intel-gfx, Mika Kuoppala, Arun Siluvery

On ke, 2016-07-20 at 12:05 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
> URL   : https://patchwork.freedesktop.org/series/10088/
> State : failure
> 
> == Summary ==
> 
> Series 10088v1 Series without cover letter
> http://patchwork.freedesktop.org/api/1.0/series/10088/revisions/1/mbox
> 
> Test gem_exec_suspend:
>         Subgroup basic-s3:
>                 pass       -> INCOMPLETE (fi-hsw-i7-4770k)
> Test gem_sync:
>         Subgroup basic-store-each:
>                 pass       -> FAIL       (ro-bdw-i7-5600u)
> 

Arun, do you mind giving these a look, Mika left for a vacation.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
  2016-07-20 12:49   ` Joonas Lahtinen
@ 2016-07-20 12:50     ` Chris Wilson
  2016-07-20 13:08       ` Joonas Lahtinen
  2016-07-20 13:11       ` Dave Gordon
  0 siblings, 2 replies; 7+ messages in thread
From: Chris Wilson @ 2016-07-20 12:50 UTC (permalink / raw)
  To: Joonas Lahtinen; +Cc: intel-gfx

On Wed, Jul 20, 2016 at 03:49:00PM +0300, Joonas Lahtinen wrote:
> On ke, 2016-07-20 at 12:05 +0000, Patchwork wrote:
> > == Series Details ==
> > 
> > Series: series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
> > URL   : https://patchwork.freedesktop.org/series/10088/
> > State : failure
> > 
> > == Summary ==
> > 
> > Series 10088v1 Series without cover letter
> > http://patchwork.freedesktop.org/api/1.0/series/10088/revisions/1/mbox
> > 
> > Test gem_exec_suspend:
> >         Subgroup basic-s3:
> >                 pass       -> INCOMPLETE (fi-hsw-i7-4770k)
> > Test gem_sync:
> >         Subgroup basic-store-each:
> >                 pass       -> FAIL       (ro-bdw-i7-5600u)
> > 
> 
> Arun, do you mind giving these a look, Mika left for a vacation.

Neither related to this pair of patches if that's what you mean.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
  2016-07-20 12:50     ` Chris Wilson
@ 2016-07-20 13:08       ` Joonas Lahtinen
  2016-07-20 13:11       ` Dave Gordon
  1 sibling, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2016-07-20 13:08 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On ke, 2016-07-20 at 13:50 +0100, Chris Wilson wrote:
> On Wed, Jul 20, 2016 at 03:49:00PM +0300, Joonas Lahtinen wrote:
> > 
> > On ke, 2016-07-20 at 12:05 +0000, Patchwork wrote:
> > > 
> > > == Series Details ==
> > > 
> > > Series: series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
> > > URL   : https://patchwork.freedesktop.org/series/10088/
> > > State : failure
> > > 
> > > == Summary ==
> > > 
> > > Series 10088v1 Series without cover letter
> > > http://patchwork.freedesktop.org/api/1.0/series/10088/revisions/1/mbox
> > > 
> > > Test gem_exec_suspend:
> > >         Subgroup basic-s3:
> > >                 pass       -> INCOMPLETE (fi-hsw-i7-4770k)
> > > Test gem_sync:
> > >         Subgroup basic-store-each:
> > >                 pass       -> FAIL       (ro-bdw-i7-5600u)
> > > 
> > Arun, do you mind giving these a look, Mika left for a vacation.
> Neither related to this pair of patches if that's what you mean.
> -Chris

Right, merging this in then. Thanks for the detective work, patch and
review.

Regards, Joonas
> 
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
  2016-07-20 12:50     ` Chris Wilson
  2016-07-20 13:08       ` Joonas Lahtinen
@ 2016-07-20 13:11       ` Dave Gordon
  1 sibling, 0 replies; 7+ messages in thread
From: Dave Gordon @ 2016-07-20 13:11 UTC (permalink / raw)
  To: Joonas Lahtinen, intel-gfx, Mika Kuoppala, Arun Siluvery

On 20/07/16 13:50, Chris Wilson wrote:
> On Wed, Jul 20, 2016 at 03:49:00PM +0300, Joonas Lahtinen wrote:
>> On ke, 2016-07-20 at 12:05 +0000, Patchwork wrote:
>>> == Series Details ==
>>>
>>> Series: series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang
>>> URL   : https://patchwork.freedesktop.org/series/10088/
>>> State : failure
>>>
>>> == Summary ==
>>>
>>> Series 10088v1 Series without cover letter
>>> http://patchwork.freedesktop.org/api/1.0/series/10088/revisions/1/mbox
>>>
>>> Test gem_exec_suspend:
>>>          Subgroup basic-s3:
>>>                  pass       -> INCOMPLETE (fi-hsw-i7-4770k)
>>> Test gem_sync:
>>>          Subgroup basic-store-each:
>>>                  pass       -> FAIL       (ro-bdw-i7-5600u)
>>>
>>
>> Arun, do you mind giving these a look, Mika left for a vacation.
>
> Neither related to this pair of patches if that's what you mean.
> -Chris

The latter is
Bug 96974 - [BAT BDW] gem_sync / basic-store-each fails sporadically
frequently seen on that specific machine, but not on any other BDW.

.Dave.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-07-20 13:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-20 11:26 [PATCH 1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang Mika Kuoppala
2016-07-20 11:26 ` [PATCH 2/2] drm/i915/gen9: Add WaDisableGatherAtSetShaderCommonSlice Mika Kuoppala
2016-07-20 12:05 ` ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915/gen9: Add WaInPlaceDecompressionHang Patchwork
2016-07-20 12:49   ` Joonas Lahtinen
2016-07-20 12:50     ` Chris Wilson
2016-07-20 13:08       ` Joonas Lahtinen
2016-07-20 13:11       ` Dave Gordon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox