drm/i915/cnl: WaForceEnableNonCoherent
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915/cnl: WaForceEnableNonCoherent
Must Force Non-Coherent whenever executing a 3D context. This is a workaround for a possible hang in the unlikely event
a TLB invalidation occurs during a PSD flush.
Set masked bit 4 in 0x7300 during boot.
--- drivers/gpu/drm/i915/intel_engine_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_engine_cs.c +4 -1
@@ -1071,8 +1071,11 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)int ret;/* WaForceContextSaveRestoreNonCoherent:cnl */ +/* WaForceEnableNonCoherent:cnl */ WA_SET_BIT_MASKED (CNL_HDC_CHICKEN0 , -HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ); +HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT | +HDC_FORCE_NON_COHERENT ); +/* WaDisableReplayBufferBankArbitrationOptimization:cnl */ WA_SET_BIT_MASKED(COMMON_SLICE_CHICKEN2,
Signature · 6 lines
2.13.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/cnl: WaForceEnableNonCoherent
== Series Details ==
== Series Details ==
Series: drm/i915/cnl: WaForceEnableNonCoherent
URL : https://patchwork.freedesktop.org/series/29243/
State : success
== Summary ==
Series 29243v1 drm/i915/cnl: WaForceEnableNonCoherent
https://patchwork.freedesktop.org/api/1.0/series/29243/revisions/1/mbox/
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
fail -> PASS (fi-skl-6700k) fdo#100367fdo#100367 https://bugs.freedesktop.org/show_bug.cgi?id=100367
fi-bdw-5557u total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:449s fi-bdw-gvtdvm total:279 pass:265 dwarn:0 dfail:0 fail:0 skip:14 time:438s fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:356s fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:558s fi-bwr-2160 total:279 pass:184 dwarn:0 dfail:0 fail:0 skip:95 time:253s fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:523s fi-byt-j1900 total:279 pass:254 dwarn:1 dfail:0 fail:0 skip:24 time:528s fi-byt-n2820 total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:514s fi-elk-e7500 total:279 pass:230 dwarn:0 dfail:0 fail:0 skip:49 time:439s fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:606s fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:451s fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:419s fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:427s fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:508s fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:473s fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:478s fi-kbl-7560u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:603s fi-kbl-r total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:601s fi-pnv-d510 total:279 pass:223 dwarn:1 dfail:0 fail:0 skip:55 time:524s fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:468s fi-skl-6700k total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:478s fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:486s fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:445s fi-skl-x1585l total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:484s fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:546s fi-snb-2600 total:279 pass:250 dwarn:0 dfail:0 fail:0 skip:29 time:408s
3adc9e3cacefe82619fc56ec78a0ca3a67a4b00c drm-tip: 2017y-08m-23d-21h-35m-35s UTC integration manifest bcab325ea91a drm/i915/cnl: WaForceEnableNonCoherent
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5480/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Rodrigo Vivi
Must Force Non-Coherent whenever executing a 3D context. This is a workaround for a possible hang in the unlikely event
a TLB invalidation occurs during a PSD flush.
Set masked bit 4 in0x7300during boot.
This bug should not be present in HW anymore. A different reason to keep doing this is performance, though.
Quoted 14 lines
Cc Mika Kuoppala <[email protected]>Cc Oscar Mateo <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_engine_cs.c +0
-0@@ -1071,8 +1071,11 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)int ret;
drivers/gpu/drm/i915/intel_engine_cs.c static int cnl_init_workarounds(struct intel_engine_cs *engine) · line 1081
Quoted 10 lines
drivers/gpu/drm/i915/intel_engine_cs.c +4
-1/* WaForceContextSaveRestoreNonCoherent:cnl */ +/* WaForceEnableNonCoherent:cnl */ WA_SET_BIT_MASKED (CNL_HDC_CHICKEN0 , -HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ); +HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT | +HDC_FORCE_NON_COHERENT ); +/* WaDisableReplayBufferBankArbitrationOptimization:cnl */ WA_SET_BIT_MASKED(COMMON_SLICE_CHICKEN2,
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Oscar Mateo
Quoted 4 lines · Rodrigo Vivi
Must Force Non-Coherent whenever executing a 3D context. This is a workaround for a possible hang in the unlikely event
a TLB invalidation occurs during a PSD flush.
Set masked bit 4 in0x7300during boot.This bug should not be present in HW anymore. A different reason to keep doing this is performance, though.
Doesn't userspace already has a choice between coherent and non-coherent access. Why would we want to cheat, and force non-coherent when it clearly wants to use coherent one?
(well, because that's what we've been always doing is one reason, the other one may be that "clearly" can sometimes turn out to be "by accident")
-Michał
Quoted 20 lines
Quoted 20 lines
Cc Mika Kuoppala <[email protected]>Cc Oscar Mateo <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_engine_cs.c +3
-1@@ -1071,8 +1071,11 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)int ret;/* WaForceContextSaveRestoreNonCoherent:cnl */ +/* WaForceEnableNonCoherent:cnl */ WA_SET_BIT_MASKED (CNL_HDC_CHICKEN0 , -HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ); +HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT | +HDC_FORCE_NON_COHERENT );
Quoted 8 lines
drivers/gpu/drm/i915/intel_engine_cs.c static int cnl_init_workarounds(struct intel_engine_cs *engine) · line 1081
Quoted 3 lines
drivers/gpu/drm/i915/intel_engine_cs.c +1
-0+/* WaDisableReplayBufferBankArbitrationOptimization:cnl */ WA_SET_BIT_MASKED(COMMON_SLICE_CHICKEN2,_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Michał Winiarski
Quoted 8 lines · Oscar Mateo
Quoted 4 lines · Rodrigo Vivi
Must Force Non-Coherent whenever executing a 3D context. This is a workaround for a possible hang in the unlikely event
a TLB invalidation occurs during a PSD flush.
Set masked bit 4 in0x7300during boot.
Quoted 9 lines
Quoted 2 lines
This bug should not be present in HW anymore. A different reason to keep doing this is performance, though.
Doesn't userspace already has a choice between coherent and non-coherent access. Why would we want to cheat, and force non-coherent when it clearly wants to use coherent one?
(well, because that's what we've been always doing is one reason, the other one may be that "clearly" can sometimes turn out to be "by accident")
Caveat for below is that I haven't investigated the cnl particulars. But we did end up having system hangs on skl in the past by mismatching this, see commit e238659ddd889a5d3fbdfa1a2ab120f90404bf41
-Mika
Quoted 30 lines
-Michał
Quoted 20 lines
Quoted 20 lines
Cc Mika Kuoppala <[email protected]>Cc Oscar Mateo <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_engine_cs.c +3
-1@@ -1071,8 +1071,11 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)int ret;/* WaForceContextSaveRestoreNonCoherent:cnl */ +/* WaForceEnableNonCoherent:cnl */ WA_SET_BIT_MASKED (CNL_HDC_CHICKEN0 , -HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ); +HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT | +HDC_FORCE_NON_COHERENT );Quoted 8 lines
drivers/gpu/drm/i915/intel_engine_cs.c static int cnl_init_workarounds(struct intel_engine_cs *engine) · line 1081
Quoted 3 lines
drivers/gpu/drm/i915/intel_engine_cs.c +1
-0+/* WaDisableReplayBufferBankArbitrationOptimization:cnl */ WA_SET_BIT_MASKED(COMMON_SLICE_CHICKEN2,_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Michał Winiarski
Quoted 6 lines · Oscar Mateo
Quoted 4 lines · Rodrigo Vivi
Must Force Non-Coherent whenever executing a 3D context. This is a workaround for a possible hang in the unlikely event
a TLB invalidation occurs during a PSD flush.
Set masked bit 4 in0x7300during boot.
Quoted 5 lines
Quoted 2 lines
This bug should not be present in HW anymore. A different reason to keep doing this is performance, though.
Doesn't userspace already has a choice between coherent and non-coherent access. Why would we want to cheat, and force non-coherent when it clearly wants to use coherent one?
But does it? I cannot find anything in i915 to allow userspace to flip this chicken bit (the register is not whitelisted and we don't have any execbuf flag/hint). Or am I missing something?
Quoted 31 lines
(well, because that's what we've been always doing is one reason, the other one may be that "clearly" can sometimes turn out to be "by accident")
-Michał
Quoted 26 lines
Quoted 12 lines
Cc Mika Kuoppala <[email protected]>Cc Oscar Mateo <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_engine_cs.c +0
-0drivers/gpu/drm/i915/intel_engine_cs.c static int cnl_init_workarounds(struct intel_engine_cs *engine) · line 1079
Quoted 10 lines
drivers/gpu/drm/i915/intel_engine_cs.c +4
-1@@ -1071,8 +1071,11 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)int ret;/* WaForceContextSaveRestoreNonCoherent:cnl */ +/* WaForceEnableNonCoherent:cnl */ WA_SET_BIT_MASKED (CNL_HDC_CHICKEN0 , -HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ); +HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT | +HDC_FORCE_NON_COHERENT ); +/* WaDisableReplayBufferBankArbitrationOptimization:cnl */ WA_SET_BIT_MASKED(COMMON_SLICE_CHICKEN2,_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 12 lines · Oscar Mateo
Quoted 9 lines · Michał Winiarski
Quoted 8 lines · Oscar Mateo
Quoted 4 lines · Rodrigo Vivi
Must Force Non-Coherent whenever executing a 3D context. This is a workaround for a possible hang in the unlikely event
a TLB invalidation occurs during a PSD flush.
Set masked bit 4 in0x7300during boot.This bug should not be present in HW anymore. A different reason to keep doing this is performance, though.
Quoted 7 lines
Quoted 3 lines
Doesn't userspace already has a choice between coherent and non-coherent access. Why would we want to cheat, and force non-coherent when it clearly wants to use coherent one?
But does it? I cannot find anything in i915 to allow userspace to flip this chicken bit (the register is not whitelisted and we don't have any execbuf flag/hint). Or am I missing something?
It's a hardware interface, not i915 interface.
See: IHD-OS-SKL-Vol7-05.16
Shared Functions -> Overview of memory accesses (Cache behavior) (page 144)
https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-skl-vol07-3d_media_gpgpu.pdf
The workaround is removing the ability to choose coherency model - even if userspace is opting in for coherent path, the HW will use non-coherent one.
-Michał
Quoted 24 lines
Quoted 24 lines
(well, because that's what we've been always doing is one reason, the other one may be that "clearly" can sometimes turn out to be "by accident")
-Michał
Quoted 18 lines
Quoted 18 lines
Cc Mika Kuoppala <[email protected]>Cc Oscar Mateo <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_engine_cs.c +2
-1@@ -1071,8 +1071,11 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)int ret;/* WaForceContextSaveRestoreNonCoherent:cnl */ +/* WaForceEnableNonCoherent:cnl */ WA_SET_BIT_MASKED(CNL_HDC_CHICKEN0, -HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT ); + HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT |
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_engine_cs.c static int cnl_init_workarounds(struct intel_engine_cs *engine) · line 1081
Quoted 4 lines
drivers/gpu/drm/i915/intel_engine_cs.c +2
-0+ HDC_FORCE_NON_COHERENT); +/* WaDisableReplayBufferBankArbitrationOptimization:cnl */ WA_SET_BIT_MASKED(COMMON_SLICE_CHICKEN2,_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx