drm/i915/icl: account for context save/restore removed bits
Subsystems (2)
The RS_CTX_ENABLE and CTX_SAVE_INHIBIT bits are not present on ICL anymore, but we still try to set them and then check them with GEM_BUG_ON, resulting in a BUG() call. The bug can be reproduced by igt/drv_selftest/live_hangcheck/others-priority and our CI was able to catch it. The machine hangs, which prevents further testing on it.
It is worth noticing that commit 05f0addd9b10 ("drm/i915/icl: Enhanced execution list support") already tried to avoid the save/restore bits on ICL, but only inside populate_lr_context().
TODO: Should we also avoid CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT on ICL for execlists_init_reg_state()? We already avoid it inside populate_lr_context().
TODO: Shouldn't a new problem surface when we remove these registers? What should we do to replace the functionality that was provided by them?
Cc: Chris Wilson <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Testcase: igt/drv_selftest/live_hangcheck/others-priority
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107399
--- drivers/gpu/drm/i915/intel_lrc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
As you may notice from the TODO comments, my GEM-fu is still not strong yet. Any help on the pending questions would be really appreciated.
drivers/gpu/drm/i915/intel_lrc.c +8 -4
@@ -541,7 +541,8 @@ static void inject_preempt_context(struct intel_engine_cs *engine)GEM_BUG_ON (execlists->preempt_complete_status !=upper_32_bits (ce->lrc_desc)); -GEM_BUG_ON ((ce->lrc_reg_state[CTX_CONTEXT_CONTROL +1 ] & +GEM_BUG_ON (INTEL_GEN (engine->i915) <11 && + (ce->lrc_reg_state[CTX_CONTEXT_CONTROL +1 ] &_MASKED_BIT_ENABLE (CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT |CTX_CTRL_ENGINE_CTX_SAVE_INHIBIT )) != _MASKED_BIT_ENABLE(CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT |
@@ -2569,6 +2570,7 @@ static void execlists_init_reg_state(u32 *regs,struct drm_i915_private *dev_priv = engine->i915;struct i915_hw_ppgtt *ppgtt = ctx->ppgtt ?: dev_priv->mm.aliasing_ppgtt;u32 base = engine->mmio_base; +u32 ctx_sr_ctl;bool rcs = engine->class ==RENDER_CLASS ;/* A context is actually a big batch buffer with several
@@ -2581,10 +2583,12 @@ static void execlists_init_reg_state(u32 *regs, regs[CTX_LRI_HEADER_0 ] =MI_LOAD_REGISTER_IMM (rcs ?14 :11 ) |MI_LRI_FORCE_POSTED ; + ctx_sr_ctl =CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT ; +if (INTEL_GEN (dev_priv) <11 ) + ctx_sr_ctl |=CTX_CTRL_ENGINE_CTX_SAVE_INHIBIT | +CTX_CTRL_RS_CTX_ENABLE ;CTX_REG (regs,CTX_CONTEXT_CONTROL ,RING_CONTEXT_CONTROL (engine), -_MASKED_BIT_DISABLE (CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT | -CTX_CTRL_ENGINE_CTX_SAVE_INHIBIT | -CTX_CTRL_RS_CTX_ENABLE ) | +_MASKED_BIT_DISABLE (ctx_sr_ctl) |_MASKED_BIT_ENABLE (CTX_CTRL_INHIBIT_SYN_CTX_SWITCH ));CTX_REG (regs,CTX_RING_HEAD ,RING_HEAD (base),0 );CTX_REG (regs,CTX_RING_TAIL ,RING_TAIL (base),0 );
Signature · 6 lines
2.14.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Paulo Zanoni (2018-08-10 00:58:52)
Quoted 5 lines
The
RS_CTX_ENABLEandCTX_SAVE_INHIBITbits are not present on ICL anymore, but we still try to set them and then check them withGEM_BUG_ON, resulting in aBUG()call. The bug can be reproduced by igt/drv_selftest/live_hangcheck/others-priority and our CI was able to catch it. The machine hangs, which prevents further testing on it.
Non-sequitur. Capture the bug report, move on after the panic. How does that prevent testing? What you might note is that CI's pstore is reporting -EIO, that is what has prevented remote debugging of this.
Quoted 7 lines
It is worth noticing that commit
05f0addd9b10("drm/i915/icl: Enhanced execution list support") already tried to avoid the save/restore bits on ICL, but only insidepopulate_lr_context().TODO: Should we also avoid
CTX_CTRL_ENGINE_CTX_RESTORE_INHIBITon ICL forexeclists_init_reg_state()? We already avoid it insidepopulate_lr_context().
RESTORE_INHIBIT is still very much required. It's just the SAVE_INHIBIT that they removed for whimsy.
Quoted 3 lines
TODO: Shouldn't a new problem surface when we remove these registers? What should we do to replace the functionality that was provided by them?
Shed a tear. Resource Streamer doesn't exist and would require userspace support for it anyway. The SAVE_INHIBIT is the one that shaves a few cycles on preemption, but is supposed to be replaced by a bit in ELSQ at the expense of forking process_csb/preemption. No one has demonstrated that the cost would be worth it.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/icl: account for context save/restore removed bits
In reply to Paulo Zanoni== Series Details ==
== Series Details ==
Series: drm/i915/icl: account for context save/restore removed bits
URL : https://patchwork.freedesktop.org/series/47976/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4639 -> Patchwork_9916 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/47976/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9916 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_coherency:
fi-gdg-551: NOTRUN -> DMESG-FAIL (fdo#107164)
igt@drv_selftest@live_hangcheck:
fi-kbl-7560u: PASS -> DMESG-FAIL (fdo#106560, fdo#106947)
fi-skl-6600u: PASS -> DMESG-FAIL (fdo#106560, fdo#107174)
{igt@kms_psr@primary_mmap_gtt}:
fi-cnl-psr: PASS -> DMESG-WARN (fdo#107372)
==== Possible fixes ====
{igt@amdgpu/amd_prime@amd-to-i915}:
fi-bxt-j4205: INCOMPLETE (fdo#103927) -> SKIP
{igt@amdgpu/amd_prime@i915-to-amd}:
fi-bxt-j4205: DMESG-FAIL -> SKIP
igt@drv_selftest@live_workarounds:
{fi-cfl-8109u}: DMESG-FAIL (fdo#107292) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-a:
{fi-byt-clapper}: FAIL (fdo#107362) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372
== Participating hosts (53 -> 47) ==
Additional (1): fi-gdg-551
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-glk-dsi fi-bsw-cyan fi-ctg-p8600 fi-icl-u
== Build changes ==
* Linux: CI_DRM_4639 -> Patchwork_9916
CI_DRM_4639: da34c4841d4bd5098cef0bd3ddaeed1ee3eb3103 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4591: 6cb3d7dbe5831a7b2b5b7a4638d8a8b7ac624f5f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9916: aedbfda6c022a2cb8c60e0dea12956f7d956ddad @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
aedbfda6c022 drm/i915/icl: account for context save/restore removed bits
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9916/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/icl: account for context save/restore removed bits
In reply to Paulo Zanoni== Series Details ==
== Series Details ==
Series: drm/i915/icl: account for context save/restore removed bits
URL : https://patchwork.freedesktop.org/series/47976/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4639_full -> Patchwork_9916_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9916_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9916_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9916_full:
=== IGT changes ===
==== Warnings ====
igt@kms_plane_lowres@pipe-a-tiling-none:
shard-snb: PASS -> SKIP +1== Known issues ==
Here are the changes found in Patchwork_9916_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-glk: FAIL (fdo#105363) -> PASS
igt@kms_flip@modeset-vs-vblank-race-interruptible:
shard-hsw: DMESG-WARN (fdo#102614) -> PASS
igt@kms_setmode@basic:
shard-kbl: FAIL (fdo#99912) -> PASS
igt@perf@buffer-fill:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS
igt@perf@polling:
shard-hsw: FAIL (fdo#102252) -> PASS fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4639 -> Patchwork_9916
CI_DRM_4639: da34c4841d4bd5098cef0bd3ddaeed1ee3eb3103 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4591: 6cb3d7dbe5831a7b2b5b7a4638d8a8b7ac624f5f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9916: aedbfda6c022a2cb8c60e0dea12956f7d956ddad @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9916/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/icl: account for context save/restore removed bits
In reply to Paulo Zanoni== Series Details ==
== Series Details ==
Series: drm/i915/icl: account for context save/restore removed bits
URL : https://patchwork.freedesktop.org/series/47976/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4643 -> Patchwork_9919 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/47976/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9919 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_module_reload@basic-reload-inject:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106248, fdo#106725)
igt@drv_selftest@live_coherency:
fi-gdg-551: PASS -> DMESG-FAIL (fdo#107164)
igt@drv_selftest@live_hangcheck:
fi-skl-guc: PASS -> DMESG-FAIL (fdo#107174)
fi-kbl-7567u: PASS -> DMESG-FAIL (fdo#106947, fdo#106560)
igt@kms_frontbuffer_tracking@basic:
{fi-byt-clapper}: PASS -> FAIL (fdo#103167)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
{fi-byt-clapper}: PASS -> FAIL (fdo#103191, fdo#107362)
==== Possible fixes ====
igt@drv_module_reload@basic-reload:
fi-glk-j4005: DMESG-WARN (fdo#106248, fdo#106725) -> PASS
igt@drv_selftest@live_hangcheck:
{fi-icl-u}: INCOMPLETE (fdo#107399) -> PASS
igt@drv_selftest@live_workarounds:
{fi-bsw-kefka}: DMESG-FAIL (fdo#107292) -> PASS
igt@kms_flip@basic-flip-vs-wf_vblank:
fi-glk-j4005: FAIL (fdo#100368) -> PASS
==== Warnings ====
{igt@kms_psr@primary_page_flip}:
fi-cnl-psr: DMESG-FAIL (fdo#107372) -> DMESG-WARN (fdo#107372) {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372
fdo#107399 https://bugs.freedesktop.org/show_bug.cgi?id=107399
== Participating hosts (53 -> 48) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4643 -> Patchwork_9919
CI_DRM_4643: 2fab0affe5a9f87309773bc4cbef828f4dde7acd @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4592: fce9638b2e60afce872b3056c19a729b1b3708be @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9919: 51a3d4c0faefb9faf09007614069ea315d0ffb57 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
51a3d4c0faef drm/i915/icl: account for context save/restore removed bits
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9919/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/icl: account for context save/restore removed bits
In reply to Paulo Zanoni== Series Details ==
== Series Details ==
Series: drm/i915/icl: account for context save/restore removed bits
URL : https://patchwork.freedesktop.org/series/47976/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4643_full -> Patchwork_9919_full =
== Summary - SUCCESS ==
No regressions found.
== Known issues ==
Here are the changes found in Patchwork_9919_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_suspend@fence-restore-untiled:
shard-glk: PASS -> FAIL (fdo#103375)
igt@gem_ctx_isolation@rcs0-s3:
shard-snb: PASS -> INCOMPLETE (fdo#105411)
igt@kms_universal_plane@cursor-fb-leak-pipe-a:
shard-apl: PASS -> FAIL (fdo#107241)
==== Possible fixes ====
igt@kms_cursor_legacy@all-pipes-torture-move:
shard-glk: DMESG-WARN (fdo#107122) -> PASS
shard-hsw: DMESG-WARN (fdo#107122) -> PASS
igt@kms_mmap_write_crc:
shard-hsw: DMESG-WARN (fdo#102614) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS
igt@kms_vblank@pipe-a-ts-continuation-suspend:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS
igt@perf@polling:
shard-hsw: FAIL (fdo#102252) -> PASS fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#107122 https://bugs.freedesktop.org/show_bug.cgi?id=107122
fdo#107241 https://bugs.freedesktop.org/show_bug.cgi?id=107241
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4643 -> Patchwork_9919
CI_DRM_4643: 2fab0affe5a9f87309773bc4cbef828f4dde7acd @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4592: fce9638b2e60afce872b3056c19a729b1b3708be @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9919: 51a3d4c0faefb9faf09007614069ea315d0ffb57 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9919/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx