drm/i915: Implement vblank synchronized MBUS join changes
Subsystems (3)
PATCH 1/1 drm/i915: Implement vblank synchronized MBUS join changes
Currently we can't change MBUS join status without doing a modeset, because we are lacking mechanism to synchronize those with vblank. However then this means that we can't do a fastset, if there is a need to change MBUS join state. Fix that by implementing such change. We already call correspondent check and update at pre_plane dbuf update, so the only thing left is to have a non-modeset version of that. If active pipes stay the same then fastset is possible and only MBUS join state/ddb allocation updates would be committed.
v2: Implement additional changes according to BSpec.
Vblank wait is needed after MBus/Dbuf programming in case if no modeset is done and we are switching from single to multiple displays, i.e mbus join state switches from "joined" to "non-joined" state. Otherwise vblank wait is not needed according to spec.
--- drivers/gpu/drm/i915/display/skl_watermark.c | 36 ++++++++++++++++---- 1 file changed, 29 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/skl_watermark.c +29 -7
@@ -2614,13 +2614,6 @@ skl_compute_ddb(struct intel_atomic_state *state)if (ret)return ret; -if (old_dbuf_state->joined_mbus != new_dbuf_state->joined_mbus) { -/* TODO: Implement vblank synchronized MBUS joining changes */ - ret =intel_modeset_all_pipes (state,"MBUS joining change" ); -if (ret) -return ret; - } - drm_dbg_kms(&i915->drm, "Enabled dbuf slices 0x%x -> 0x%x (total dbuf slices 0x%x), mbus joined? %s->%s\n", old_dbuf_state->enabled_slices,
@@ -3528,6 +3521,35 @@ void intel_dbuf_pre_plane_update(struct intel_atomic_state *state)gen9_dbuf_slices_update (i915, old_dbuf_state->enabled_slices | new_dbuf_state->enabled_slices); + +/* +* If we are not doing a modeset, that means we must synchronize +* our MBUS configuration changes with vblank. +* According to MBus programming section of BSpec, we must wait for vblank +* on active crtc, which was single display, when switching from single +* display(mbus joined) to additional multiple displays(mbus not joined) +* after Mbus/Dbuf slice programming is done. +*/ +if (!state->modeset && !new_dbuf_state->joined_mbus && old_dbuf_state->joined_mbus) { +struct intel_crtc *crtc; +struct intel_crtc_state *new_crtc_state, *old_crtc_state; +int i; + +for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { +/* +* Need to wait for vblank only if crtc was active prior to that change, +* i.e this is a scenario when we switch from single display to multiple +* displays, without doing a full modeset and it still stays on, according +* to BSpec only in that case we need to wait for vblank on that previously +* single display. Otherwise no wait is needed. Rest of the cases, are not +* possible without a modeset anyway. +*/ +if (!new_crtc_state->hw.active || !old_crtc_state->hw.active) +continue ; + +intel_crtc_wait_for_next_vblank (crtc); + } + } }void intel_dbuf_post_plane_update (struct intel_atomic_state *state)
Signature · 1 line
2.37.3
Thank You for the patch. This does the trick. No full modest because of Mbus joining
Quoted 98 lines · Stanislav Lisovskiy
Currently we can't change MBUS join status without doing a modeset, because we are lacking mechanism to synchronize those with vblank. However then this means that we can't do a fastset, if there is a need
to change MBUS join state. Fix that by implementing such change. We already call correspondent check and update atpre_planedbuf update,
so the only thing left is to have a non-modeset version of that. If active pipes stay the same then fastset is possible and only MBUS join state/ddb allocation updates would be committed.v2: Implement additional changes according to BSpec.
Vblank wait is needed after MBus/Dbuf programming in case if no modeset is done and we are switching from single to multiple displays, i.e mbus join state switches from "joined" to "non-
joined"
state. Otherwise vblank wait is not needed according to spec.Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/display/skl_watermark.c | 36 ++++++++++++++++ ---- 1 file changed, 29 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/display/skl_watermark.c +0
-2@@ -2614,13 +2614,6 @@ skl_compute_ddb(struct intel_atomic_state *state)if (ret)return ret; -if (old_dbuf_state->joined_mbus != new_dbuf_state- >joined_mbus) { -/* TODO: Implement vblank synchronized MBUS joining changes */
drivers/gpu/drm/i915/display/skl_watermark.c +0
-1- ret = intel_modeset_all_pipes(state, "MBUSjoining change");
drivers/gpu/drm/i915/display/skl_watermark.c +0
-4-if (ret) -return ret; - } - drm_dbg_kms(&i915->drm, "Enabled dbuf slices 0x%x -> 0x%x (totaldbuf slices 0x%x), mbus joined? %s->%s\n",
drivers/gpu/drm/i915/display/skl_watermark.c +3
-0old_dbuf_state->enabled_slices,@@ -3528,6 +3521,35 @@ void intel_dbuf_pre_plane_update(struct intel_atomic_state *state) gen9_dbuf_slices_update(i915, old_dbuf_state->enabled_slices | new_dbuf_state->enabled_slices); + +/* +* If we are not doing a modeset, that means we must synchronize
drivers/gpu/drm/i915/display/skl_watermark.c +2
-0+* our MBUS configuration changes with vblank. +* According to MBus programming section of BSpec, we must wait for vblank
drivers/gpu/drm/i915/display/skl_watermark.c +1
-0+* on active crtc, which was single display, when switching from single
drivers/gpu/drm/i915/display/skl_watermark.c +1
-0+* display(mbus joined) to additional multiple displays(mbus not joined)
drivers/gpu/drm/i915/display/skl_watermark.c +3
-0+* after Mbus/Dbuf slice programming is done. +*/ + if (!state->modeset && !new_dbuf_state->joined_mbus &&
old_dbuf_state->joined_mbus) {drivers/gpu/drm/i915/display/skl_watermark.c +2
-0+struct intel_crtc *crtc; + struct intel_crtc_state *new_crtc_state,
*old_crtc_state;drivers/gpu/drm/i915/display/skl_watermark.c +3
-0+int i; + + for_each_oldnew_intel_crtc_in_state(state, crtc,
old_crtc_state,new_crtc_state, i) {drivers/gpu/drm/i915/display/skl_watermark.c +2
-0+/* +* Need to wait for vblank only if crtc was active prior to that change,
drivers/gpu/drm/i915/display/skl_watermark.c +1
-0+* i.e this is a scenario when we switch from single display to multiple
drivers/gpu/drm/i915/display/skl_watermark.c +1
-0+* displays, without doing a full modeset and it still stays on, according
drivers/gpu/drm/i915/display/skl_watermark.c +1
-0+* to BSpec only in that case we need to wait for vblank on that previously
drivers/gpu/drm/i915/display/skl_watermark.c +1
-0+* single display. Otherwise no wait is needed. Rest of the cases, are not
drivers/gpu/drm/i915/display/skl_watermark.c +3
-0+* possible without a modeset anyway. +*/ + if (!new_crtc_state->hw.active ||!old_crtc_state->hw.active)
drivers/gpu/drm/i915/display/skl_watermark.c +5
-0+continue ; + +intel_crtc_wait_for_next_vblank (crtc); + } + } }void intel_dbuf_post_plane_update (struct intel_atomic_state *state)
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Implement vblank synchronized MBUS join changes (rev2)
In reply to Stanislav Lisovskiy== Series Details ==
== Series Details ==
Series: drm/i915: Implement vblank synchronized MBUS join changes (rev2)
URL : https://patchwork.freedesktop.org/series/122264/
State : warning
== Summary ==
Error: dim checkpatch failed/home/kbuild2/linux/maintainer-tools/dim: line 50: /home/kbuild2/.dimrc: No such file or directory
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Implement vblank synchronized MBUS join changes (rev2)
In reply to Stanislav Lisovskiy== Series Details ==
== Series Details ==
Series: drm/i915: Implement vblank synchronized MBUS join changes (rev2)
URL : https://patchwork.freedesktop.org/series/122264/
State : warning
== Summary ==
Error: dim sparse failed/home/kbuild2/linux/maintainer-tools/dim: line 50: /home/kbuild2/.dimrc: No such file or directory
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Implement vblank synchronized MBUS join changes (rev2)
In reply to Stanislav Lisovskiy== Series Details ==
== Series Details ==
Series: drm/i915: Implement vblank synchronized MBUS join changes (rev2)
URL : https://patchwork.freedesktop.org/series/122264/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13500 -> Patchwork_122264v2
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_122264v2 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_122264v2, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/index.html
Participating hosts (42 -> 42)
------------------------------
Additional (1): fi-kbl-soraka
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_122264v2:
### IGT changes ###
#### Possible regressions ####
* igt@gem_busy@busy@all-engines:
- bat-mtlp-8: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-mtlp-8/igt@gem_busy@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-mtlp-8/igt@gem_busy@[email protected]
* igt@i915_module_load@reload:
- fi-hsw-4770: [PASS][3] -> [ABORT][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-hsw-4770/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-hsw-4770/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_122264v2 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@core_auth@basic-auth:
- bat-adlp-11: NOTRUN -> [ABORT][5] ([i915#4423] / [i915#8011])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-adlp-11/igt@[email protected]
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#2190])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-kbl-soraka/igt@[email protected]
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#4613]) +3 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-kbl-soraka/igt@[email protected]
* igt@i915_pm_rpm@basic-rte:
- fi-kbl-7567u: [PASS][8] -> [FAIL][9] ([i915#7940])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-kbl-7567u/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-kbl-7567u/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-rkl-11600: [PASS][10] -> [FAIL][11] ([i915#7940])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-rkl-11600/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-rkl-11600/igt@[email protected]
- fi-skl-guc: [PASS][12] -> [FAIL][13] ([i915#7940])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-skl-guc/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-skl-guc/igt@[email protected]
* igt@i915_selftest@live@gt_mocs:
- bat-mtlp-6: [PASS][14] -> [DMESG-FAIL][15] ([i915#7059])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-mtlp-6/igt@i915_selftest@live@gt_mocs.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-mtlp-6/igt@i915_selftest@live@gt_mocs.html
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][16] ([i915#1886] / [i915#7913])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@i915_selftest@live@reset:
- bat-rpls-2: NOTRUN -> [ABORT][17] ([i915#4983] / [i915#7461] / [i915#7913] / [i915#7981] / [i915#8347])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-rpls-2/igt@i915_selftest@[email protected]
* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-dg2-11: NOTRUN -> [SKIP][18] ([i915#7828])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-dg2-11/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-kbl-soraka: NOTRUN -> [SKIP][19] ([fdo#109271]) +16 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-kbl-soraka/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- bat-adlp-6: [PASS][20] -> [DMESG-WARN][21] ([i915#7507]) +9 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-adlp-6/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-adlp-6/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-dp-3:
- bat-adlp-6: [PASS][22] -> [ABORT][23] ([i915#8668])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-adlp-6/igt@kms_pipe_crc_basic@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-adlp-6/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc:
- fi-bsw-nick: NOTRUN -> [SKIP][24] ([fdo#109271]) +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-bsw-nick/igt@[email protected]
#### Possible fixes ####
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-tgl-1115g4: [FAIL][25] ([i915#7940]) -> [PASS][26] +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-tgl-1115g4/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-tgl-1115g4/igt@[email protected]
* igt@i915_pm_rpm@basic-rte:
- fi-cfl-8109u: [FAIL][27] ([i915#7940]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-cfl-8109u/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-cfl-8109u/igt@[email protected]
* igt@i915_selftest@live@execlists:
- fi-bsw-nick: [ABORT][29] ([i915#7911] / [i915#7913]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-bsw-nick/igt@i915_selftest@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/fi-bsw-nick/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@gt_lrc:
- bat-dg2-11: [INCOMPLETE][31] ([i915#7609] / [i915#7913]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html
* igt@i915_selftest@live@migrate:
- bat-atsm-1: [DMESG-FAIL][33] ([i915#7699] / [i915#7913]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-atsm-1/igt@i915_selftest@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-atsm-1/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@requests:
- bat-rpls-2: [ABORT][35] ([i915#4983] / [i915#7913]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-rpls-2/igt@i915_selftest@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-rpls-2/igt@i915_selftest@[email protected]
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-a-edp-1:
- bat-adlp-6: [ABORT][37] ([i915#7977] / [i915#8469] / [i915#8668]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-adlp-6/igt@kms_pipe_crc_basic@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-adlp-6/igt@kms_pipe_crc_basic@[email protected]
#### Warnings ####
* igt@i915_module_load@load:
- bat-adlp-11: [ABORT][39] ([i915#4423]) -> [DMESG-WARN][40] ([i915#4423])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-adlp-11/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-adlp-11/igt@[email protected]
* igt@kms_psr@cursor_plane_move:
- bat-rplp-1: [SKIP][41] ([i915#1072]) -> [ABORT][42] ([i915#8469] / [i915#8668])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-rplp-1/igt@kms_psr@cursor_plane_move.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/bat-rplp-1/igt@kms_psr@cursor_plane_move.html
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#7059]: https://gitlab.freedesktop.org/drm/intel/issues/7059
[i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
[i915#7507]: https://gitlab.freedesktop.org/drm/intel/issues/7507
[i915#7609]: https://gitlab.freedesktop.org/drm/intel/issues/7609
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7940]: https://gitlab.freedesktop.org/drm/intel/issues/7940
[i915#7977]: https://gitlab.freedesktop.org/drm/intel/issues/7977
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
[i915#8469]: https://gitlab.freedesktop.org/drm/intel/issues/8469
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
Build changes
-------------
* Linux: CI_DRM_13500 -> Patchwork_122264v2
CI-20190529: 20190529
CI_DRM_13500: 4be6c76008410cf6ada52b25cb4bc4280bc3a3ee @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7426: 67e7470eb79ca386087775d0b1b51c164abbf9c8 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_122264v2: 4be6c76008410cf6ada52b25cb4bc4280bc3a3ee @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
2e1c686ad4cd drm/i915: Implement vblank synchronized MBUS join changes
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122264v2/index.html