drm/i915/cnl: WaPipeControlBefore3DStateSamplePattern
Subsystems (2)
PATCH v3 1/1 drm/i915/cnl: WaPipeControlBefore3DStateSamplePattern
This workaround should prevent a bug that can be hit on a context restore. To avoid the issue, we must emit a PIPE_CONTROL with CS stall (0x7a000004 0x00100000 0x00000000 0x00000000) followed by 12DW's of NOOP(0x0) in the indirect context batch buffer, to ensure the engine is idle prior to programming 3DSTATE_SAMPLE_PATTERN.
It's also not clear whether we should add those extra dwords because of the workaround itself, or if that's just padding for the WA BB (and next commands could come right after the PIPE_CONTROL). We keep them for now.
References: HSD#1939868
v2: More descriptive changelog and comments.
v3: Explain that PIPE_CONTROL is actually 6 dwords, and that we advance
10 more dwords because of that.
--- drivers/gpu/drm/i915/intel_lrc.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_lrc.c +37 -1
@@ -1328,6 +1328,40 @@ static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch)return batch; } +static u32 *gen10_init_indirectctx_bb (struct intel_engine_cs *engine,u32 *batch) +{ +int i; + +/* +* WaPipeControlBefore3DStateSamplePattern: cnl +* +* Ensure the engine is idle prior to programming a +* 3DSTATE_SAMPLE_PATTERN during a context restore. +*/ + batch =gen8_emit_pipe_control (batch, +PIPE_CONTROL_CS_STALL , +0 ); +/* +* WaPipeControlBefore3DStateSamplePattern says we need 4 dwords for +* the PIPE_CONTROL followed by 12 dwords of 0x0, so 16 dwords in +* total. However, a PIPE_CONTROL is 6 dwords long, not 4, which is +* confusing. Since gen8_emit_pipe_control() already advances the +* batch by 6 dwords, we advance the other 10 here, completing a +* cacheline. It's not clear if the workaround requires this padding +* before other commands, or if it's just the regular padding we would +* already have for the workaround bb, so leave it here for now. +*/ +for (i =0 ; i <10 ; i++) + *batch++ =MI_NOOP ; + +/* Pad to end of cacheline */ +while ((unsigned long )batch %CACHELINE_BYTES ) + *batch++ =MI_NOOP ; + +return batch; +} + +#define CTX_WA_BB_OBJ_SIZE (PAGE_SIZE)static int lrc_setup_wa_ctx (struct intel_engine_cs *engine)
@@ -1381,7 +1415,9 @@ static int intel_init_workaround_bb(struct intel_engine_cs *engine)switch (INTEL_GEN (engine->i915)) {case 10 : -return 0 ; + wa_bb_fn[0 ] = gen10_init_indirectctx_bb; + wa_bb_fn[1 ] =NULL ; +break ;case 9 : wa_bb_fn[0 ] = gen9_init_indirectctx_bb; wa_bb_fn[1 ] =NULL ;
Signature · 6 lines
2.14.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/cnl: WaPipeControlBefore3DStateSamplePattern (rev3)
== Series Details ==
== Series Details ==
Series: drm/i915/cnl: WaPipeControlBefore3DStateSamplePattern (rev3)
URL : https://patchwork.freedesktop.org/series/37148/
State : success
== Summary ==
Series 37148v3 drm/i915/cnl: WaPipeControlBefore3DStateSamplePattern
https://patchwork.freedesktop.org/api/1.0/series/37148/revisions/3/mbox/
Test debugfs_test:
Subgroup read_all_entries:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:418s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:426s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:374s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:494s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:286s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:489s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:489s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:471s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:461s fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:570s fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:584s fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:416s fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:292s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:516s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:390s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:398s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:414s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:466s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:416s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:458s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:501s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:455s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:501s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:604s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:431s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:511s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:527s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:489s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:480s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:418s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:428s fi-snb-2520m total:3 pass:2 dwarn:0 dfail:0 fail:0 skip:0 fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:400s
Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:476s
89ac14dcb4d010748c1b54dba54885db1a8c13e3 drm-tip: 2018y-02m-05d-19h-08m-24s UTC integration manifest f05c7e6e8721 drm/i915/cnl: WaPipeControlBefore3DStateSamplePattern
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7896/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: warning for drm/i915/cnl: WaPipeControlBefore3DStateSamplePattern (rev3)
In reply to Rafael Antognolli== Series Details ==
== Series Details ==
Series: drm/i915/cnl: WaPipeControlBefore3DStateSamplePattern (rev3)
URL : https://patchwork.freedesktop.org/series/37148/
State : warning
== Summary ==
Test kms_atomic_transition:
Subgroup plane-use-after-nonblocking-unbind-fencing:
pass -> SKIP (shard-snb)
Test kms_mmap_write_crc:
pass -> SKIP (shard-snb)
Test perf:
Subgroup oa-exponents:
pass -> FAIL (shard-apl) fdo#102254
Subgroup buffer-fill:
pass -> FAIL (shard-apl) fdo#103755
Test drv_suspend:
Subgroup fence-restore-tiled2untiled:
skip -> PASS (shard-snb) fdo#102365
Test kms_cursor_crc:
Subgroup cursor-256x256-offscreen:
pass -> SKIP (shard-snb)
Test kms_flip:
Subgroup plain-flip-fb-recreate-interruptible:
pass -> FAIL (shard-hsw) fdo#100368 +1
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047
Test gem_exec_schedule:
Subgroup preempt-self-vebox:
fail -> PASS (shard-apl) fdo#102848fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#103755 https://bugs.freedesktop.org/show_bug.cgi?id=103755
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#102848 https://bugs.freedesktop.org/show_bug.cgi?id=102848
shard-apl total:3341 pass:1722 dwarn:1 dfail:0 fail:23 skip:1593 time:11983s shard-hsw total:3442 pass:1757 dwarn:1 dfail:0 fail:12 skip:1671 time:11867s shard-snb total:3442 pass:1348 dwarn:1 dfail:0 fail:10 skip:2083 time:6569s
Blacklisted hosts:
shard-kbl total:3442 pass:1892 dwarn:19 dfail:1 fail:21 skip:1509 time:9671s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7896/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Rafael Antognolli (2018-02-05 23:33:30)
Quoted 12 lines
This workaround should prevent a bug that can be hit on a context restore. To avoid the issue, we must emit a
PIPE_CONTROLwith CS stall (0x7a0000040x001000000x000000000x00000000) followed by 12DW's of NOOP(0x0) in the indirect context batch buffer, to ensure the engine is idle prior to programming 3DSTATE_SAMPLE_PATTERN.It's also not clear whether we should add those extra dwords because of the workaround itself, or if that's just padding for the WA BB (and next commands could come right after the
PIPE_CONTROL). We keep them for now.References: HSD#1939868
Quoted 7 lines
v2: More descriptive changelog and comments.
v3: Explain thatPIPE_CONTROLis actually 6 dwords, and that we advance
10 more dwords because of that.Signed-off-by Rafael Antognolli <[email protected]>Cc Chris Wilson <[email protected]>Acked-by Chris Wilson <[email protected]>
Thanks for the clear comment elucidating our doubt about what is actually required for the w/a. Pushed.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx