Skip to contentSkip to conversation

drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate

PATCH Applied [email protected] 4 participants 5 messages Jun 13, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate

From: Tim Gore <[email protected]>

This patch enables a workaround for a mid thread preemption issue where a hardware timing problem can prevent the context restore from happening, leading to a hang.

v2: move to gen9_init_workarounds (Arun)
v3: move to start of gen9_init_workarounds (Arun)

---
 drivers/gpu/drm/i915/i915_reg.h         | 4 ++++
 drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++
 2 files changed, 7 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index 81d1896..2a6fc62 100644
@@ -1810,6 +1810,10 @@ enum skl_disp_power_wells {
 #define   GEN9_IZ_HASHING_MASK(slice)			(0x3 << ((slice) * 2))
 #define   GEN9_IZ_HASHING(slice, val)			((val) << ((slice) * 2))
 
+/* chicken reg for WaConextSwitchWithConcurrentTLBInvalidate */
+#define GEN9_CSFE_CHICKEN1_RCS _MMIO(0x20D4)
+#define   GEN9_PREEMPT_GPGPU_SYNC_SWITCH_DISABLE (1 << 2)
+
 /* WaClearTdlStateAckDirtyBits */
 #define GEN8_STATE_ACK		_MMIO(0x20F0)
 #define GEN9_STATE_ACK_SLICE1	_MMIO(0x20F8)
drivers/gpu/drm/i915/intel_ringbuffer.c +3 -0
index cf8d0bf..110c7fc 100644
@@ -910,6 +910,9 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)
 	struct drm_i915_private *dev_priv = engine->i915;
 	int ret;
 
+	/* WaConextSwitchWithConcurrentTLBInvalidate:skl,bxt,kbl */
+	I915_WRITE(GEN9_CSFE_CHICKEN1_RCS, _MASKED_BIT_ENABLE(GEN9_PREEMPT_GPGPU_SYNC_SWITCH_DISABLE));
+
 	/* WaEnableLbsSlaRetryTimerDecrement:skl,bxt,kbl */
 	I915_WRITE(BDW_SCRATCH1, I915_READ(BDW_SCRATCH1) |
 		   GEN9_LBS_SLA_RETRY_TIMER_DECREMENT_ENABLE);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Ro.CI.BAT: warning for drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate (rev3)

== Series Details ==

== Series Details ==

Series: drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate (rev3)
URL : https://patchwork.freedesktop.org/series/8487/
State : warning

== Summary ==

Series 8487v3 drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate
http://patchwork.freedesktop.org/api/1.0/series/8487/revisions/3/mbox

Test gem_exec_flush:

        Subgroup basic-batch-kernel-default-cmd:
                fail       -> PASS       (ro-byt-n2820)
Test gem_exec_suspend:
        Subgroup basic-s3:
                pass       -> DMESG-WARN (ro-bdw-i7-5557U)
Test kms_force_connector_basic:
        Subgroup force-connector-state:
                skip       -> PASS       (ro-ivb2-i7-3770)
        Subgroup force-edid:
                skip       -> PASS       (ro-ivb2-i7-3770)
        Subgroup prune-stale-modes:
                skip       -> PASS       (ro-ivb2-i7-3770)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-b:
                pass       -> SKIP       (fi-skl-i5-6260u)
        Subgroup suspend-read-crc-pipe-b:
                skip       -> DMESG-WARN (ro-bdw-i7-5557U)
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> SKIP       (ro-bdw-i5-5250u)
fi-bdw-i7-5557u  total:213  pass:201  dwarn:0   dfail:0   fail:0   skip:12 
fi-skl-i5-6260u  total:213  pass:201  dwarn:0   dfail:0   fail:0   skip:12 
fi-skl-i7-6700k  total:213  pass:188  dwarn:0   dfail:0   fail:0   skip:25 
fi-snb-i7-2600   total:213  pass:174  dwarn:0   dfail:0   fail:0   skip:39 
ro-bdw-i5-5250u  total:213  pass:197  dwarn:1   dfail:0   fail:0   skip:15 
ro-bdw-i7-5557U  total:213  pass:197  dwarn:2   dfail:0   fail:0   skip:14 
ro-bdw-i7-5600u  total:213  pass:185  dwarn:0   dfail:0   fail:0   skip:28 
ro-bsw-n3050     total:213  pass:172  dwarn:0   dfail:0   fail:2   skip:39 
ro-byt-n2820     total:213  pass:174  dwarn:0   dfail:0   fail:2   skip:37 
ro-hsw-i3-4010u  total:213  pass:190  dwarn:0   dfail:0   fail:0   skip:23 
ro-hsw-i7-4770r  total:213  pass:190  dwarn:0   dfail:0   fail:0   skip:23 
ro-ilk-i7-620lm  total:213  pass:150  dwarn:0   dfail:0   fail:1   skip:62 
ro-ilk1-i5-650   total:208  pass:150  dwarn:0   dfail:0   fail:1   skip:57 
ro-ivb-i7-3770   total:213  pass:181  dwarn:0   dfail:0   fail:0   skip:32 
ro-ivb2-i7-3770  total:213  pass:185  dwarn:0   dfail:0   fail:0   skip:28 
ro-skl3-i5-6260u total:213  pass:201  dwarn:1   dfail:0   fail:0   skip:11 
ro-snb-i7-2620M  total:213  pass:174  dwarn:0   dfail:0   fail:1   skip:38 

fi-hsw-i7-4770k failed to connect after reboot

Results at /archive/results/CI_IGT_test/RO_Patchwork_1171/

f80cfb4 drm-intel-nightly: 2016y-06m-13d-10h-41m-19s UTC integration manifest 3f1502e drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#2 lore raw

Re: ✗ Ro.CI.BAT: warning for drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate (rev3)

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 21 lines

-----Original Message-----
From: Patchwork [mailto:[email protected]]
Sent: Monday, June 13, 2016 12:40 PM
To: Gore, Tim
Cc: [email protected]
Subject: ✗ Ro.CI.BAT: warning for drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate (rev3)

== Series Details ==

Series: drm/i915/gen9: implement
WaConextSwitchWithConcurrentTLBInvalidate (rev3)
URL : https://patchwork.freedesktop.org/series/8487/
State : warning

== Summary ==

Series 8487v3 drm/i915/gen9: implement
WaConextSwitchWithConcurrentTLBInvalidate
http://patchwork.freedesktop.org/api/1.0/series/8487/revisions/3/mbox

Quoted 6 lines

Test gem_exec_flush:

        Subgroup basic-batch-kernel-default-cmd:
                fail       -> PASS       (ro-byt-n2820)
Test gem_exec_suspend:
        Subgroup basic-s3:
                pass       -> DMESG-WARN (ro-bdw-i7-5557U)

See https://bugs.freedesktop.org/show_bug.cgi?id=96448

Quoted 12 lines

Test kms_force_connector_basic:

        Subgroup force-connector-state:
                skip       -> PASS       (ro-ivb2-i7-3770)
        Subgroup force-edid:
                skip       -> PASS       (ro-ivb2-i7-3770)
        Subgroup prune-stale-modes:
                skip       -> PASS       (ro-ivb2-i7-3770)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-b:
                pass       -> SKIP       (fi-skl-i5-6260u)
        Subgroup suspend-read-crc-pipe-b:
                skip       -> DMESG-WARN (ro-bdw-i7-5557U)

See https://bugs.freedesktop.org/show_bug.cgi?id=96448

Quoted 20 lines
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> SKIP       (ro-bdw-i5-5250u)
fi-bdw-i7-5557u  total:213  pass:201  dwarn:0   dfail:0   fail:0   skip:12
fi-skl-i5-6260u  total:213  pass:201  dwarn:0   dfail:0   fail:0   skip:12
fi-skl-i7-6700k  total:213  pass:188  dwarn:0   dfail:0   fail:0   skip:25
fi-snb-i7-2600   total:213  pass:174  dwarn:0   dfail:0   fail:0   skip:39
ro-bdw-i5-5250u  total:213  pass:197  dwarn:1   dfail:0   fail:0   skip:15
ro-bdw-i7-5557U  total:213  pass:197  dwarn:2   dfail:0   fail:0   skip:14
ro-bdw-i7-5600u  total:213  pass:185  dwarn:0   dfail:0   fail:0   skip:28
ro-bsw-n3050     total:213  pass:172  dwarn:0   dfail:0   fail:2   skip:39
ro-byt-n2820     total:213  pass:174  dwarn:0   dfail:0   fail:2   skip:37
ro-hsw-i3-4010u  total:213  pass:190  dwarn:0   dfail:0   fail:0   skip:23
ro-hsw-i7-4770r  total:213  pass:190  dwarn:0   dfail:0   fail:0   skip:23
ro-ilk-i7-620lm  total:213  pass:150  dwarn:0   dfail:0   fail:1   skip:62
ro-ilk1-i5-650   total:208  pass:150  dwarn:0   dfail:0   fail:1   skip:57
ro-ivb-i7-3770   total:213  pass:181  dwarn:0   dfail:0   fail:0   skip:32
ro-ivb2-i7-3770  total:213  pass:185  dwarn:0   dfail:0   fail:0   skip:28
ro-skl3-i5-6260u total:213  pass:201  dwarn:1   dfail:0   fail:0   skip:11
ro-snb-i7-2620M  total:213  pass:174  dwarn:0   dfail:0   fail:1   skip:38
Quoted 7 lines

fi-hsw-i7-4770k failed to connect after reboot

Results at /archive/results/CI_IGT_test/RO_Patchwork_1171/

f80cfb4 drm-intel-nightly: 2016y-06m-13d-10h-41m-19s UTC integration manifest 3f1502e drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: ✗ Ro.CI.BAT: warning for drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate (rev3)

Quoted 48 lines · Tim

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 21 lines

-----Original Message-----
From: Patchwork [mailto:[email protected]]
Sent: Monday, June 13, 2016 12:40 PM
To: Gore, Tim
Cc: [email protected]
Subject: ✗ Ro.CI.BAT: warning for drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate (rev3)

== Series Details ==

Series: drm/i915/gen9: implement
WaConextSwitchWithConcurrentTLBInvalidate (rev3)
URL : https://patchwork.freedesktop.org/series/8487/
State : warning

== Summary ==

Series 8487v3 drm/i915/gen9: implement
WaConextSwitchWithConcurrentTLBInvalidate
http://patchwork.freedesktop.org/api/1.0/series/8487/revisions/3/mbox

Quoted 6 lines

Test gem_exec_flush:

         Subgroup basic-batch-kernel-default-cmd:
                 fail       -> PASS       (ro-byt-n2820)
Test gem_exec_suspend:
         Subgroup basic-s3:
                 pass       -> DMESG-WARN (ro-bdw-i7-5557U)

See https://bugs.freedesktop.org/show_bug.cgi?id=96448

Quoted 12 lines

Test kms_force_connector_basic:

         Subgroup force-connector-state:
                 skip       -> PASS       (ro-ivb2-i7-3770)
         Subgroup force-edid:
                 skip       -> PASS       (ro-ivb2-i7-3770)
         Subgroup prune-stale-modes:
                 skip       -> PASS       (ro-ivb2-i7-3770)
Test kms_pipe_crc_basic:
         Subgroup nonblocking-crc-pipe-b:
                 pass       -> SKIP       (fi-skl-i5-6260u)
         Subgroup suspend-read-crc-pipe-b:
                 skip       -> DMESG-WARN (ro-bdw-i7-5557U)
Quoted 29 lines

See https://bugs.freedesktop.org/show_bug.cgi?id=96448

Quoted 27 lines
         Subgroup suspend-read-crc-pipe-c:
                 dmesg-warn -> SKIP       (ro-bdw-i5-5250u)
fi-bdw-i7-5557u  total:213  pass:201  dwarn:0   dfail:0   fail:0   skip:12
fi-skl-i5-6260u  total:213  pass:201  dwarn:0   dfail:0   fail:0   skip:12
fi-skl-i7-6700k  total:213  pass:188  dwarn:0   dfail:0   fail:0   skip:25
fi-snb-i7-2600   total:213  pass:174  dwarn:0   dfail:0   fail:0   skip:39
ro-bdw-i5-5250u  total:213  pass:197  dwarn:1   dfail:0   fail:0   skip:15
ro-bdw-i7-5557U  total:213  pass:197  dwarn:2   dfail:0   fail:0   skip:14
ro-bdw-i7-5600u  total:213  pass:185  dwarn:0   dfail:0   fail:0   skip:28
ro-bsw-n3050     total:213  pass:172  dwarn:0   dfail:0   fail:2   skip:39
ro-byt-n2820     total:213  pass:174  dwarn:0   dfail:0   fail:2   skip:37
ro-hsw-i3-4010u  total:213  pass:190  dwarn:0   dfail:0   fail:0   skip:23
ro-hsw-i7-4770r  total:213  pass:190  dwarn:0   dfail:0   fail:0   skip:23
ro-ilk-i7-620lm  total:213  pass:150  dwarn:0   dfail:0   fail:1   skip:62
ro-ilk1-i5-650   total:208  pass:150  dwarn:0   dfail:0   fail:1   skip:57
ro-ivb-i7-3770   total:213  pass:181  dwarn:0   dfail:0   fail:0   skip:32
ro-ivb2-i7-3770  total:213  pass:185  dwarn:0   dfail:0   fail:0   skip:28
ro-skl3-i5-6260u total:213  pass:201  dwarn:1   dfail:0   fail:0   skip:11
ro-snb-i7-2620M  total:213  pass:174  dwarn:0   dfail:0   fail:1   skip:38

fi-hsw-i7-4770k failed to connect after reboot

Results at /archive/results/CI_IGT_test/RO_Patchwork_1171/

f80cfb4 drm-intel-nightly: 2016y-06m-13d-10h-41m-19s UTC integration manifest 3f1502e drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate

Merged, thanks for the patch and review.

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v3 1/1
#4 lore raw
In reply to [email protected]
Quoted 35 lines · On 13/06/2016 16:45, [email protected] wrote:

From: Tim Gore <[email protected]>

This patch enables a workaround for a mid thread preemption issue where a hardware timing problem can prevent the context restore from happening, leading to a hang.

v2: move to gen9_init_workarounds (Arun)
v3: move to start of gen9_init_workarounds (Arun)

---
  drivers/gpu/drm/i915/i915_reg.h         | 4 ++++
  drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++
  2 files changed, 7 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index 81d1896..2a6fc62 100644
@@ -1810,6 +1810,10 @@ enum skl_disp_power_wells {
  #define   GEN9_IZ_HASHING_MASK(slice)			(0x3 << ((slice) * 2))
  #define   GEN9_IZ_HASHING(slice, val)			((val) << ((slice) * 2))
 
+/* chicken reg for WaConextSwitchWithConcurrentTLBInvalidate */
+#define GEN9_CSFE_CHICKEN1_RCS _MMIO(0x20D4)
+#define   GEN9_PREEMPT_GPGPU_SYNC_SWITCH_DISABLE (1 << 2)
+
  /* WaClearTdlStateAckDirtyBits */
  #define GEN8_STATE_ACK		_MMIO(0x20F0)
  #define GEN9_STATE_ACK_SLICE1	_MMIO(0x20F8)
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -0
index cf8d0bf..110c7fc 100644

drivers/gpu/drm/i915/intel_ringbuffer.c static int gen9_init_workarounds(struct intel_engine_cs *engine) · line 915

Quoted 6 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +3 -0
@@ -910,6 +910,9 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)
  	struct drm_i915_private *dev_priv = engine->i915;
  	int ret;
 
+	/* WaConextSwitchWithConcurrentTLBInvalidate:skl,bxt,kbl */
+	I915_WRITE(GEN9_CSFE_CHICKEN1_RCS, _MASKED_BIT_ENABLE(GEN9_PREEMPT_GPGPU_SYNC_SWITCH_DISABLE));
+

agrees with spec. It would've been good to have correct spelling but to match with existing documentation we have to use the same name.

regards
Arun

drivers/gpu/drm/i915/intel_ringbuffer.c static int gen9_init_workarounds(struct intel_engine_cs *engine) · line 918

Quoted 4 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -0
  	/* WaEnableLbsSlaRetryTimerDecrement:skl,bxt,kbl */
  	I915_WRITE(BDW_SCRATCH1, I915_READ(BDW_SCRATCH1) |
  		   GEN9_LBS_SLA_RETRY_TIMER_DECREMENT_ENABLE);

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx