drm/i915: Swap ggtt_vma during legacy cursor update
Subsystems (3)
PATCH 1/2 drm/i915: Swap ggtt_vma during legacy cursor update
--- drivers/gpu/drm/i915/display/intel_cursor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_cursor.c +2 -3
@@ -688,9 +688,8 @@ intel_legacy_cursor_update(struct drm_plane *_plane,if (ret) goto out_free; - ret =intel_plane_pin_fb (new_plane_state); -if (ret) - goto out_free; +/* magic trick! */ +swap (new_plane_state->ggtt_vma, old_plane_state->ggtt_vma);intel_frontbuffer_flush (to_intel_frontbuffer (new_plane_state->hw.fb),ORIGIN_CURSOR_UPDATE );
Signature · 1 line
2.39.2
PATCH 2/2 drm/i915: Handle legacy cursor update as normal update
Abuse the vblank worker to make the changes as small as possible. We need a way to sync flip_done, but if we wait on flip_done, all async tests start failing.
--- drivers/gpu/drm/i915/display/intel_crtc.c | 21 ++++++++++++++------ drivers/gpu/drm/i915/display/intel_crtc.h | 6 ++++-- drivers/gpu/drm/i915/display/intel_display.c | 10 +++++++--- 3 files changed, 26 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/display/intel_crtc.c +15 -6
@@ -389,8 +389,13 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)return ret; } -static bool intel_crtc_needs_vblank_work (const struct intel_crtc_state *crtc_state) +static bool intel_crtc_needs_vblank_work (const struct intel_atomic_state *state, +const struct intel_crtc_state *crtc_state) { +/* Always init for legacy cursor update, so we can sync on teardown */ +if (state->base.legacy_cursor_update) +return true; +return crtc_state->hw.active && !intel_crtc_needs_modeset (crtc_state) && !crtc_state->preload_luts &&
@@ -438,7 +443,7 @@ void intel_wait_for_vblank_workers(struct intel_atomic_state *state)int i;for_each_new_intel_crtc_in_state (state, crtc, crtc_state, i) { -if (!intel_crtc_needs_vblank_work (crtc_state)) +if (!intel_crtc_needs_vblank_work (state, crtc_state))continue ;drm_vblank_work_flush (&crtc_state->vblank_work);
@@ -470,6 +475,7 @@ static int intel_mode_vblank_start(const struct drm_display_mode *mode)/** * intel_pipe_update_start() - start update of a set of display registers +* @state: the intel atomic state * @new_crtc_state: the new crtc state * * Mark the start of an update to pipe registers that should be updated
@@ -480,7 +486,8 @@ static int intel_mode_vblank_start(const struct drm_display_mode *mode)* until a subsequent call to intel_pipe_update_end(). That is done to * avoid random delays. */ -void intel_pipe_update_start (struct intel_crtc_state *new_crtc_state) +void intel_pipe_update_start (struct intel_atomic_state *state, +struct intel_crtc_state *new_crtc_state) {struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);
@@ -497,7 +504,7 @@ void intel_pipe_update_start(struct intel_crtc_state *new_crtc_state)if (new_crtc_state->do_async_flip)return ; -if (intel_crtc_needs_vblank_work (new_crtc_state)) +if (intel_crtc_needs_vblank_work (state, new_crtc_state))intel_crtc_vblank_work_init (new_crtc_state);if (new_crtc_state->vrr.enable) {
@@ -631,13 +638,15 @@ static void dbg_vblank_evade(struct intel_crtc *crtc, ktime_t end) {}/** * intel_pipe_update_end() - end update of a set of display registers +* @state: the intel atomic state * @new_crtc_state: the new crtc state * * Mark the end of an update started with intel_pipe_update_start(). This * re-enables interrupts and verifies the update was actually completed * before a vblank. */ -void intel_pipe_update_end (struct intel_crtc_state *new_crtc_state) +void intel_pipe_update_end (struct intel_atomic_state *state, +struct intel_crtc_state *new_crtc_state) {struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc);enum pipe pipe = crtc->pipe;
@@ -665,7 +674,7 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)* Would be slightly nice to just grab the vblank count and arm the * event outside of the critical section - the spinlock might spin for a * while ... */ -if (intel_crtc_needs_vblank_work (new_crtc_state)) { +if (intel_crtc_needs_vblank_work (state, new_crtc_state)) {drm_vblank_work_schedule (&new_crtc_state->vblank_work,drm_crtc_accurate_vblank_count (&crtc->base) +1 , false);
drivers/gpu/drm/i915/display/intel_crtc.h +4 -2
@@ -36,8 +36,10 @@ void intel_crtc_state_reset(struct intel_crtc_state *crtc_state,u32 intel_crtc_get_vblank_counter (struct intel_crtc *crtc);void intel_crtc_vblank_on (const struct intel_crtc_state *crtc_state);void intel_crtc_vblank_off (const struct intel_crtc_state *crtc_state); -void intel_pipe_update_start (struct intel_crtc_state *new_crtc_state); -void intel_pipe_update_end (struct intel_crtc_state *new_crtc_state); +void intel_pipe_update_start (struct intel_atomic_state *state, +struct intel_crtc_state *new_crtc_state); +void intel_pipe_update_end (struct intel_atomic_state *state, +struct intel_crtc_state *new_crtc_state);void intel_wait_for_vblank_workers (struct intel_atomic_state *state);struct intel_crtc *intel_first_crtc (struct drm_i915_private *i915); struct intel_crtc *intel_crtc_for_pipe(struct drm_i915_private *i915,
drivers/gpu/drm/i915/display/intel_display.c +7 -3
@@ -6604,7 +6604,7 @@ static void intel_update_crtc(struct intel_atomic_state *state,intel_crtc_planes_update_noarm (state, crtc);/* Perform vblank evasion around commit operation */ -intel_pipe_update_start (new_crtc_state); +intel_pipe_update_start (state, new_crtc_state);commit_pipe_pre_planes (state, crtc);
@@ -6612,7 +6612,7 @@ static void intel_update_crtc(struct intel_atomic_state *state,commit_pipe_post_planes (state, crtc); -intel_pipe_update_end (new_crtc_state); +intel_pipe_update_end (state, new_crtc_state);/* * We usually enable FIFO underrun interrupts as part of the
@@ -6895,6 +6895,9 @@ static void intel_atomic_cleanup_work(struct work_struct *work)struct intel_crtc *crtc;int i; +if (state->base.legacy_cursor_update) +intel_wait_for_vblank_workers (state); +for_each_old_intel_crtc_in_state (state, crtc, old_crtc_state, i)intel_color_cleanup_commit (old_crtc_state);
@@ -7056,7 +7059,8 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)if (state->modeset)intel_set_cdclk_post_plane_update (state); -intel_wait_for_vblank_workers (state); +if (!state->base.legacy_cursor_update) +intel_wait_for_vblank_workers (state);/* FIXME: We should call drm_atomic_helper_commit_hw_done() here * already, but still need the state for the delayed optimization. To
Signature · 1 line
2.39.2
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Swap ggtt_vma during legacy cursor update
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Swap ggtt_vma during legacy cursor update
URL : https://patchwork.freedesktop.org/series/122286/
State : warning
== Summary ==
Error: dim checkpatch failed/home/kbuild/linux/maintainer-tools/dim: line 50: /home/kbuild/.dimrc: No such file or directory
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915: Swap ggtt_vma during legacy cursor update
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Swap ggtt_vma during legacy cursor update
URL : https://patchwork.freedesktop.org/series/122286/
State : warning
== Summary ==
Error: dim sparse failed/home/kbuild/linux/maintainer-tools/dim: line 50: /home/kbuild/.dimrc: No such file or directory
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Swap ggtt_vma during legacy cursor update
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Swap ggtt_vma during legacy cursor update
URL : https://patchwork.freedesktop.org/series/122286/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13500 -> Patchwork_122286v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_122286v1 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_122286v1, 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_122286v1/index.html
Participating hosts (42 -> 41)
------------------------------
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_122286v1:
### IGT changes ###
#### Possible regressions ####
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-pnv-d510: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-pnv-d510/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-pnv-d510/igt@[email protected]
- fi-blb-e6850: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-blb-e6850/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-blb-e6850/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- fi-elk-e7500: [PASS][5] -> [INCOMPLETE][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-elk-e7500/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-elk-e7500/igt@[email protected]
- fi-hsw-4770: [PASS][7] -> [ABORT][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-hsw-4770/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-hsw-4770/igt@[email protected]
- fi-ivb-3770: [PASS][9] -> [ABORT][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-ivb-3770/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-ivb-3770/igt@[email protected]
- fi-ilk-650: [PASS][11] -> [INCOMPLETE][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-ilk-650/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-ilk-650/igt@[email protected]
* igt@kms_psr@cursor_plane_move:
- bat-mtlp-8: [PASS][13] -> [ABORT][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-mtlp-8/igt@kms_psr@cursor_plane_move.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-mtlp-8/igt@kms_psr@cursor_plane_move.html
- bat-jsl-1: [PASS][15] -> [ABORT][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-jsl-1/igt@kms_psr@cursor_plane_move.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-jsl-1/igt@kms_psr@cursor_plane_move.html
- bat-adln-1: [PASS][17] -> [ABORT][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-adln-1/igt@kms_psr@cursor_plane_move.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-adln-1/igt@kms_psr@cursor_plane_move.html
- fi-skl-6600u: [PASS][19] -> [ABORT][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-skl-6600u/igt@kms_psr@cursor_plane_move.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-skl-6600u/igt@kms_psr@cursor_plane_move.html
- bat-jsl-3: [PASS][21] -> [ABORT][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-jsl-3/igt@kms_psr@cursor_plane_move.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-jsl-3/igt@kms_psr@cursor_plane_move.html
Known issues
------------
Here are the changes found in Patchwork_122286v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@core_auth@basic-auth:
- bat-adlp-11: NOTRUN -> [ABORT][23] ([i915#8011])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-adlp-11/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-skl-guc: [PASS][24] -> [FAIL][25] ([i915#7940])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-skl-guc/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-skl-guc/igt@[email protected]
* igt@i915_selftest@live@requests:
- bat-rpls-1: [PASS][26] -> [ABORT][27] ([i915#4983] / [i915#7911] / [i915#7920])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-rpls-1/igt@i915_selftest@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-rpls-1/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@reset:
- bat-rpls-2: NOTRUN -> [ABORT][28] ([i915#4983] / [i915#7461] / [i915#7913] / [i915#8347])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-rpls-2/igt@i915_selftest@[email protected]
* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-dg2-11: NOTRUN -> [SKIP][29] ([i915#7828])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-dg2-11/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc:
- fi-bsw-nick: NOTRUN -> [SKIP][30] ([fdo#109271]) +1 similar issue
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-bsw-nick/igt@[email protected]
* igt@kms_psr@primary_mmap_gtt:
- bat-rplp-1: NOTRUN -> [ABORT][31] ([i915#8442] / [i915#8668])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-rplp-1/igt@kms_psr@primary_mmap_gtt.html
#### Possible fixes ####
* igt@i915_pm_rpm@basic-pci-d3-state:
- bat-adlp-9: [FAIL][32] ([i915#7940]) -> [PASS][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-adlp-9/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-adlp-9/igt@[email protected]
* igt@i915_pm_rpm@basic-rte:
- fi-tgl-1115g4: [FAIL][34] ([i915#7940]) -> [PASS][35]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-tgl-1115g4/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-tgl-1115g4/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-kbl-7567u: [FAIL][36] ([i915#7940]) -> [PASS][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-kbl-7567u/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-kbl-7567u/igt@[email protected]
* igt@i915_selftest@live@execlists:
- fi-bsw-nick: [ABORT][38] ([i915#7911] / [i915#7913]) -> [PASS][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/fi-bsw-nick/igt@i915_selftest@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/fi-bsw-nick/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@gt_lrc:
- bat-dg2-11: [INCOMPLETE][40] ([i915#7609] / [i915#7913]) -> [PASS][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html
* igt@i915_selftest@live@migrate:
- bat-atsm-1: [DMESG-FAIL][42] ([i915#7699] / [i915#7913]) -> [PASS][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-atsm-1/igt@i915_selftest@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-atsm-1/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@requests:
- bat-rpls-2: [ABORT][44] ([i915#4983] / [i915#7913]) -> [PASS][45]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-rpls-2/igt@i915_selftest@[email protected]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-rpls-2/igt@i915_selftest@[email protected]
- bat-mtlp-6: [DMESG-FAIL][46] ([i915#8497]) -> [PASS][47]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-mtlp-6/igt@i915_selftest@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-mtlp-6/igt@i915_selftest@[email protected]
#### Warnings ####
* igt@i915_module_load@load:
- bat-adlp-11: [ABORT][48] ([i915#4423]) -> [DMESG-WARN][49] ([i915#4423])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-adlp-11/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-adlp-11/igt@[email protected]
* igt@kms_psr@sprite_plane_onoff:
- bat-rplp-1: [ABORT][50] ([i915#8442] / [i915#8668] / [i915#8712]) -> [SKIP][51] ([i915#1072])
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13500/bat-rplp-1/igt@kms_psr@sprite_plane_onoff.html
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/bat-rplp-1/igt@kms_psr@sprite_plane_onoff.html
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
[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#7920]: https://gitlab.freedesktop.org/drm/intel/issues/7920
[i915#7940]: https://gitlab.freedesktop.org/drm/intel/issues/7940
[i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
[i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
[i915#8442]: https://gitlab.freedesktop.org/drm/intel/issues/8442
[i915#8497]: https://gitlab.freedesktop.org/drm/intel/issues/8497
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
[i915#8712]: https://gitlab.freedesktop.org/drm/intel/issues/8712
Build changes
-------------
* Linux: CI_DRM_13500 -> Patchwork_122286v1
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_122286v1: 4be6c76008410cf6ada52b25cb4bc4280bc3a3ee @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
4dfe6044b99d drm/i915: Handle legacy cursor update as normal update c949c78be725 drm/i915: Swap ggtt_vma during legacy cursor update
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_122286v1/index.html