Skip to contentSkip to conversation

drm/i915: implement async_flip mode per plane tracking

PATCH Superseded Andrzej Hajda 3 participants 5 messages Sep 9, 2022 – Sep 12, 2022

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: implement async_flip mode per plane tracking

Current implementation of async flip w/a relies on assumption that
previous atomic commit contains valid information if async_flip is still
enabled on the plane. It is incorrect. If previous commit did not modify
the plane its state->uapi.async_flip can be false. As a result DMAR/PIPE
errors can be observed:
i915 0000:00:02.0: [drm] *ERROR* Fault errors on pipe A: 0x00000080
i915 0000:00:02.0: [drm] *ERROR* Fault errors on pipe A: 0x00000080
DMAR: DRHD: handling fault status reg 2
DMAR: [DMA Read NO_PASID] Request device [00:02.0] fault addr 0x0 [fault reason 0x06] PTE Read access is not set

---
 drivers/gpu/drm/i915/display/intel_atomic_plane.c  | 6 ++++++
 drivers/gpu/drm/i915/display/intel_display.c       | 7 ++++---
 drivers/gpu/drm/i915/display/intel_display_types.h | 3 +++
 3 files changed, 13 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_atomic_plane.c +6 -0
index dd876dbbaa394d..4b4d8427b466c0 100644
@@ -591,6 +591,12 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
 	if (new_plane_state->uapi.visible || old_plane_state->uapi.visible)
 		new_crtc_state->update_planes |= BIT(plane->id);
 
+	if (new_crtc_state->uapi.async_flip && plane->async_flip)
+		new_crtc_state->async_flip_planes |= BIT(plane->id);
+	else if (new_plane_state->uapi.visible != old_plane_state->uapi.visible ||
+		 new_plane_state->uapi.fb != old_plane_state->uapi.fb)
+		new_crtc_state->async_flip_planes &= ~BIT(plane->id);
+
 	if (new_plane_state->uapi.visible &&
 	    intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier)) {
 		new_crtc_state->data_rate_y[plane->id] =
drivers/gpu/drm/i915/display/intel_display.c +4 -3
index 72e2091d9fcb59..7bab74b2a4ae2e 100644
@@ -1292,7 +1292,8 @@ static void intel_crtc_async_flip_disable_wa(struct intel_atomic_state *state,
 		intel_atomic_get_old_crtc_state(state, crtc);
 	const struct intel_crtc_state *new_crtc_state =
 		intel_atomic_get_new_crtc_state(state, crtc);
-	u8 update_planes = new_crtc_state->update_planes;
+	u8 disable_async_flip_planes = old_crtc_state->async_flip_planes &
+				       ~new_crtc_state->async_flip_planes;
 	const struct intel_plane_state *old_plane_state;
 	struct intel_plane *plane;
 	bool need_vbl_wait = false;
@@ -1301,7 +1302,7 @@ static void intel_crtc_async_flip_disable_wa(struct intel_atomic_state *state,
 	for_each_old_intel_plane_in_state(state, plane, old_plane_state, i) {
 		if (plane->need_async_flip_disable_wa &&
 		    plane->pipe == crtc->pipe &&
-		    update_planes & BIT(plane->id)) {
+		    disable_async_flip_planes & BIT(plane->id)) {
 			/*
 			 * Apart from the async flip bit we want to
 			 * preserve the old state for the plane.
@@ -1418,7 +1419,7 @@ static void intel_pre_plane_update(struct intel_atomic_state *state,
 	 * WA for platforms where async address update enable bit
 	 * is double buffered and only latched at start of vblank.
 	 */
-	if (old_crtc_state->uapi.async_flip && !new_crtc_state->uapi.async_flip)
+	if (old_crtc_state->async_flip_planes & ~new_crtc_state->async_flip_planes)
 		intel_crtc_async_flip_disable_wa(state, crtc);
 }
 
drivers/gpu/drm/i915/display/intel_display_types.h +3 -0
index 0da9b208d56e8b..b37891a8def780 100644
@@ -1234,6 +1234,9 @@ struct intel_crtc_state {
 	/* bitmask of planes that will be updated during the commit */
 	u8 update_planes;
 
+	/* bitmask of planes with async flip active */
+	u8 async_flip_planes;
+
 	u8 framestart_delay; /* 1-4 */
 	u8 msa_timing_delay; /* 0-3 */
 
Signature · 1 line
2.34.1
#1 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: implement async_flip mode per plane tracking

== Series Details ==

== Series Details ==

Series: drm/i915: implement async_flip mode per plane tracking
URL : https://patchwork.freedesktop.org/series/108371/
State : warning

== Summary ==

Error: dim checkpatch failed
7ca16b47c300 drm/i915: implement async_flip mode per plane tracking
-:14: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #14:
DMAR: [DMA Read NO_PASID] Request device [00:02.0] fault addr 0x0 [fault reason 0x06] PTE Read access is not set

total: 0 errors, 1 warnings, 0 checks, 46 lines checked

#2 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: implement async_flip mode per plane tracking

In reply to Andrzej Hajda
== Series Details ==

== Series Details ==

Series: drm/i915: implement async_flip mode per plane tracking
URL : https://patchwork.freedesktop.org/series/108371/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12109 -> Patchwork_108371v1
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/index.html

Participating hosts (39 -> 36)
------------------------------

Additional (1): fi-rkl-11600
Missing (4): bat-dg2-8 bat-dg2-11 bat-dg2-9 fi-bdw-samus

Known issues
------------

Here are the changes found in Patchwork_108371v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_huc_copy@huc-copy:
- fi-rkl-11600: NOTRUN -> [SKIP][1] ([i915#2190])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-engines:
- fi-rkl-11600: NOTRUN -> [SKIP][2] ([i915#4613]) +3 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@[email protected]

* igt@gem_tiled_pread_basic:
- fi-rkl-11600: NOTRUN -> [SKIP][3] ([i915#3282])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@gem_tiled_pread_basic.html

* igt@i915_pm_backlight@basic-brightness:
- fi-rkl-11600: NOTRUN -> [SKIP][4] ([i915#3012])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@[email protected]

* igt@i915_selftest@live@gem:
- fi-blb-e6850: [PASS][5] -> [DMESG-FAIL][6] ([i915#4528])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/fi-blb-e6850/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-blb-e6850/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@requests:
- fi-pnv-d510: [PASS][7] -> [DMESG-FAIL][8] ([i915#4528])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/fi-pnv-d510/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-pnv-d510/igt@i915_selftest@[email protected]

* igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600: NOTRUN -> [INCOMPLETE][9] ([i915#5982])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-rkl-11600: NOTRUN -> [SKIP][10] ([fdo#111827]) +7 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-rkl-11600: NOTRUN -> [SKIP][11] ([i915#4103])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- fi-rkl-11600: NOTRUN -> [SKIP][12] ([fdo#109285] / [i915#4098])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@[email protected]

* igt@kms_psr@sprite_plane_onoff:
- fi-rkl-11600: NOTRUN -> [SKIP][13] ([i915#1072]) +3 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@kms_psr@sprite_plane_onoff.html

* igt@kms_setmode@basic-clone-single-crtc:
- fi-rkl-11600: NOTRUN -> [SKIP][14] ([i915#3555] / [i915#4098])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@[email protected]

* igt@prime_vgem@basic-read:
- fi-rkl-11600: NOTRUN -> [SKIP][15] ([fdo#109295] / [i915#3291] / [i915#3708]) +2 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@[email protected]

* igt@prime_vgem@basic-userptr:
- fi-rkl-11600: NOTRUN -> [SKIP][16] ([fdo#109295] / [i915#3301] / [i915#3708])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-rkl-11600/igt@[email protected]

* igt@runner@aborted:
- fi-blb-e6850: NOTRUN -> [FAIL][17] ([fdo#109271] / [i915#2403] / [i915#4312])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-blb-e6850/igt@[email protected]
- fi-pnv-d510: NOTRUN -> [FAIL][18] ([fdo#109271] / [i915#2403] / [i915#4312])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/fi-pnv-d510/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s0@smem:
- {bat-rplp-1}: [DMESG-WARN][19] ([i915#2867]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/bat-rplp-1/igt@gem_exec_suspend@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/bat-rplp-1/igt@gem_exec_suspend@[email protected]

* igt@i915_selftest@live@reset:
- {bat-rpls-1}: [DMESG-FAIL][21] ([i915#4983] / [i915#5828]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/bat-rpls-1/igt@i915_selftest@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/bat-rpls-1/igt@i915_selftest@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5828]: https://gitlab.freedesktop.org/drm/intel/issues/5828
[i915#5982]: https://gitlab.freedesktop.org/drm/intel/issues/5982

Build changes
-------------

* Linux: CI_DRM_12109 -> Patchwork_108371v1

CI-20190529: 20190529
CI_DRM_12109: 51a8d45da4c7bd59936fab3d2ea4acf849c36f40 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6649: 7d91a6952dadaa9001b662ed60c08ccb8364929d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_108371v1: 51a8d45da4c7bd59936fab3d2ea4acf849c36f40 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

809ae5565ad7 drm/i915: implement async_flip mode per plane tracking

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/index.html

#3 lore raw

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: implement async_flip mode per plane tracking

In reply to Andrzej Hajda
== Series Details ==

== Series Details ==

Series: drm/i915: implement async_flip mode per plane tracking
URL : https://patchwork.freedesktop.org/series/108371/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12109_full -> Patchwork_108371v1_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_108371v1_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_108371v1_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

Participating hosts (11 -> 11)
------------------------------

No changes in participating hosts

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_108371v1_full:

### IGT changes ###

#### Possible regressions ####

* igt@i915_module_load@reload-with-fault-injection:
- shard-tglb: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-tglb2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-tglb5/igt@[email protected]

#### Warnings ####

* igt@kms_flip@2x-flip-vs-panning:
- shard-tglb: [SKIP][3] ([fdo#109274] / [fdo#111825] / [i915#3637]) -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-tglb3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-tglb6/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_108371v1_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@feature_discovery@psr2:
- shard-iclb: [PASS][5] -> [SKIP][6] ([i915#658])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb5/igt@[email protected]

* igt@gem_create@create-massive:
- shard-snb: NOTRUN -> [DMESG-WARN][7] ([i915#4991])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-snb7/igt@[email protected]
- shard-glk: NOTRUN -> [DMESG-WARN][8] ([i915#4991])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk6/igt@[email protected]

* igt@gem_eio@kms:
- shard-tglb: [PASS][9] -> [FAIL][10] ([i915#5784])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-tglb6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-tglb5/igt@[email protected]

* igt@gem_exec_balancer@parallel-out-fence:
- shard-iclb: [PASS][11] -> [SKIP][12] ([i915#4525]) +3 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb5/igt@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: NOTRUN -> [FAIL][13] ([i915#2842])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_schedule@wide@rcs0:
- shard-glk: [PASS][14] -> [FAIL][15] ([i915#6659])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-glk3/igt@gem_exec_schedule@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk7/igt@gem_exec_schedule@[email protected]

* igt@gem_lmem_swapping@parallel-random-verify:
- shard-apl: NOTRUN -> [SKIP][16] ([fdo#109271] / [i915#4613])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl1/igt@[email protected]

* igt@gem_lmem_swapping@verify-ccs:
- shard-glk: NOTRUN -> [SKIP][17] ([fdo#109271] / [i915#4613])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk6/igt@[email protected]

* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [PASS][18] -> [DMESG-WARN][19] ([i915#180])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-apl6/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl2/igt@[email protected]

* igt@i915_pm_dc@dc3co-vpb-simulation:
- shard-glk: NOTRUN -> [SKIP][20] ([fdo#109271] / [i915#658])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk6/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- shard-tglb: [PASS][21] -> [DMESG-WARN][22] ([i915#5591])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-tglb7/igt@i915_selftest@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-tglb2/igt@i915_selftest@[email protected]

* igt@kms_ccs@pipe-a-bad-rotation-90-4_tiled_dg2_rc_ccs_cc:
- shard-glk: NOTRUN -> [SKIP][23] ([fdo#109271]) +22 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk6/igt@kms_ccs@pipe-a-bad-rotation-90-4_tiled_dg2_rc_ccs_cc.html

* igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs_cc:
- shard-apl: NOTRUN -> [SKIP][24] ([fdo#109271] / [i915#3886]) +3 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl7/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_chamelium@hdmi-hpd-enable-disable-mode:
- shard-snb: NOTRUN -> [SKIP][25] ([fdo#109271] / [fdo#111827])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-snb7/igt@[email protected]
- shard-glk: NOTRUN -> [SKIP][26] ([fdo#109271] / [fdo#111827])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk6/igt@[email protected]

* igt@kms_color_chamelium@ctm-red-to-blue:
- shard-apl: NOTRUN -> [SKIP][27] ([fdo#109271] / [fdo#111827]) +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl6/igt@[email protected]

* igt@kms_content_protection@legacy:
- shard-apl: NOTRUN -> [TIMEOUT][28] ([i915#1319])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl1/igt@[email protected]

* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [PASS][29] -> [INCOMPLETE][30] ([i915#180] / [i915#1982] / [i915#4939] / [i915#6598])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-apl8/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl1/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-dp1:
- shard-apl: [PASS][31] -> [FAIL][32] ([i915#79])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-apl8/igt@kms_flip@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl1/igt@kms_flip@[email protected]

* igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-16bpp-4tile-upscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][33] ([i915#2672]) +4 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb3/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-16bpp-4tile-upscaling@pipe-a-default-mode.html

* igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-16bpp-xtile-downscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][34] ([i915#3555]) +1 similar issue
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-16bpp-xtile-downscaling@pipe-a-default-mode.html

* igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-75@pipe-c-dp-1:
- shard-apl: NOTRUN -> [SKIP][35] ([fdo#109271]) +51 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl7/igt@kms_plane_scaling@[email protected]

* igt@kms_psr2_sf@cursor-plane-move-continuous-exceed-fully-sf:
- shard-apl: NOTRUN -> [SKIP][36] ([fdo#109271] / [i915#658]) +1 similar issue
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl1/igt@[email protected]

* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: [PASS][37] -> [SKIP][38] ([fdo#109441]) +2 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb5/igt@kms_psr@psr2_sprite_mmap_gtt.html

* igt@kms_psr_stress_test@flip-primary-invalidate-overlay:
- shard-tglb: [PASS][39] -> [SKIP][40] ([i915#5519])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-tglb6/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-tglb2/igt@[email protected]

* igt@kms_vblank@pipe-d-wait-idle:
- shard-glk: NOTRUN -> [SKIP][41] ([fdo#109271] / [i915#533])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk6/igt@[email protected]

* igt@perf@polling-parameterized:
- shard-glk: [PASS][42] -> [FAIL][43] ([i915#5639])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-glk9/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk3/igt@[email protected]

* igt@perf_pmu@rc6-runtime-pm:
- shard-snb: NOTRUN -> [SKIP][44] ([fdo#109271]) +48 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-snb7/igt@[email protected]

* igt@sysfs_clients@create:
- shard-glk: NOTRUN -> [SKIP][45] ([fdo#109271] / [i915#2994])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk6/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_balancer@parallel-bb-first:
- shard-iclb: [SKIP][46] ([i915#4525]) -> [PASS][47]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb7/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb2/igt@[email protected]

* igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-glk: [FAIL][48] ([i915#2842]) -> [PASS][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-glk8/igt@gem_exec_fair@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk5/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none-share@rcs0:
- shard-tglb: [FAIL][50] ([i915#2842]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-tglb7/igt@gem_exec_fair@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-tglb6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-apl: [FAIL][52] ([i915#2842]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-apl2/igt@gem_exec_fair@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl7/igt@gem_exec_fair@[email protected]

* igt@gen9_exec_parse@allowed-single:
- shard-glk: [DMESG-WARN][54] ([i915#5566] / [i915#716]) -> [PASS][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-glk3/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk6/igt@[email protected]

* igt@i915_pm_dc@dc6-dpms:
- shard-iclb: [FAIL][56] ([i915#454]) -> [PASS][57]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb3/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb7/igt@[email protected]

* igt@kms_atomic_transition@plane-all-transition-nonblocking-fencing@pipe-a-vga-1:
- shard-snb: [INCOMPLETE][58] -> [PASS][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-snb5/igt@kms_atomic_transition@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-snb7/igt@kms_atomic_transition@[email protected]

* igt@kms_cursor_legacy@basic-flip-before-cursor@legacy:
- shard-iclb: [DMESG-WARN][60] ([i915#4391]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb7/igt@kms_cursor_legacy@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb1/igt@kms_cursor_legacy@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank@ac-hdmi-a1-hdmi-a2:
- shard-glk: [FAIL][62] ([i915#79]) -> [PASS][63] +1 similar issue
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-glk9/igt@kms_flip@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-glk3/igt@kms_flip@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes:
- shard-apl: [DMESG-WARN][64] ([i915#180]) -> [PASS][65] +2 similar issues
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-apl2/igt@kms_plane@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl1/igt@kms_plane@[email protected]

* igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-5@pipe-b-edp-1:
- shard-iclb: [SKIP][66] ([i915#5235]) -> [PASS][67] +2 similar issues
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb2/igt@kms_plane_scaling@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb5/igt@kms_plane_scaling@[email protected]

* igt@kms_psr2_su@page_flip-xrgb8888:
- shard-iclb: [SKIP][68] ([fdo#109642] / [fdo#111068] / [i915#658]) -> [PASS][69] +1 similar issue
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb7/igt@kms_psr2_su@page_flip-xrgb8888.html
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb2/igt@kms_psr2_su@page_flip-xrgb8888.html

* igt@kms_psr@psr2_primary_render:
- shard-iclb: [SKIP][70] ([fdo#109441]) -> [PASS][71] +1 similar issue
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb7/igt@kms_psr@psr2_primary_render.html
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb2/igt@kms_psr@psr2_primary_render.html

* igt@kms_psr_stress_test@flip-primary-invalidate-overlay:
- shard-iclb: [SKIP][72] ([i915#5519]) -> [PASS][73]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb8/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb8/igt@[email protected]

#### Warnings ####

* igt@gem_exec_balancer@parallel-ordering:
- shard-iclb: [SKIP][74] ([i915#4525]) -> [FAIL][75] ([i915#6117])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb7/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb1/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-fully-sf:
- shard-iclb: [SKIP][76] ([i915#658]) -> [SKIP][77] ([i915#2920]) +1 similar issue
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb7/igt@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb2/igt@[email protected]

* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area:
- shard-iclb: [SKIP][78] ([i915#2920]) -> [SKIP][79] ([fdo#111068] / [i915#658]) +1 similar issue
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-iclb2/igt@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-iclb5/igt@[email protected]

* igt@runner@aborted:
- shard-apl: ([FAIL][80], [FAIL][81], [FAIL][82], [FAIL][83], [FAIL][84]) ([i915#180] / [i915#3002] / [i915#4312] / [i915#5257] / [i915#6599]) -> ([FAIL][85], [FAIL][86], [FAIL][87], [FAIL][88]) ([fdo#109271] / [i915#180] / [i915#3002] / [i915#4312] / [i915#5257] / [i915#6599])
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-apl2/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-apl4/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-apl2/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-apl6/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12109/shard-apl3/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl2/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl7/igt@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl8/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_108371v1/shard-apl1/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2530]: https://gitlab.freedesktop.org/drm/intel/issues/2530
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
[i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4939]: https://gitlab.freedesktop.org/drm/intel/issues/4939
[i915#4991]: https://gitlab.freedesktop.org/drm/intel/issues/4991
[i915#5030]: https://gitlab.freedesktop.org/drm/intel/issues/5030
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5257]: https://gitlab.freedesktop.org/drm/intel/issues/5257
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5519]: https://gitlab.freedesktop.org/drm/intel/issues/5519
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591
[i915#5639]: https://gitlab.freedesktop.org/drm/intel/issues/5639
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
[i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6598]: https://gitlab.freedesktop.org/drm/intel/issues/6598
[i915#6599]: https://gitlab.freedesktop.org/drm/intel/issues/6599
[i915#6659]: https://gitlab.freedesktop.org/drm/intel/issues/6659
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79

Build changes
-------------

* Linux: CI_DRM_12109 -> Patchwork_108371v1

CI-20190529: 20190529
CI_DRM_12109: 51a8d45da4c7bd59936fab3d2ea4acf849c36f40 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6649: 7d91a6952dadaa9001b662ed60c08ccb8364929d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_108371v1: 51a8d45da4c7bd59936fab3d2ea4acf849c36f40 @ 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_108371v1/index.html

#4 lore raw
In reply to Andrzej Hajda
Quoted 22 lines · Andrzej Hajda

Current implementation of async flip w/a relies on assumption that
previous atomic commit contains valid information if async_flip is still
enabled on the plane. It is incorrect. If previous commit did not modify
the plane its state->uapi.async_flip can be false. As a result DMAR/PIPE
errors can be observed:
i915 0000:00:02.0: [drm] *ERROR* Fault errors on pipe A: 0x00000080
i915 0000:00:02.0: [drm] *ERROR* Fault errors on pipe A: 0x00000080
DMAR: DRHD: handling fault status reg 2
DMAR: [DMA Read NO_PASID] Request device [00:02.0] fault addr 0x0 [fault reason 0x06] PTE Read access is not set

---
 drivers/gpu/drm/i915/display/intel_atomic_plane.c  | 6 ++++++
 drivers/gpu/drm/i915/display/intel_display.c       | 7 ++++---
 drivers/gpu/drm/i915/display/intel_display_types.h | 3 +++
 3 files changed, 13 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_atomic_plane.c +0 -0
index dd876dbbaa394d..4b4d8427b466c0 100644

drivers/gpu/drm/i915/display/intel_atomic_plane.c int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_ · line 598

Quoted 8 lines
drivers/gpu/drm/i915/display/intel_atomic_plane.c +5 -0
@@ -591,6 +591,12 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
 	if (new_plane_state->uapi.visible || old_plane_state->uapi.visible)
 		new_crtc_state->update_planes |= BIT(plane->id);
 
+	if (new_crtc_state->uapi.async_flip && plane->async_flip)
+		new_crtc_state->async_flip_planes |= BIT(plane->id);
+	else if (new_plane_state->uapi.visible != old_plane_state->uapi.visible ||
+		 new_plane_state->uapi.fb != old_plane_state->uapi.fb)
+		new_crtc_state->async_flip_planes &= ~BIT(plane->id);

We should clear it in intel_plane_set_invisible() and calculate properly otherwise. Seems this also won't catch anything that happens later in the modeset (eg. intel_modeset_all_pipes() or skl_{wm,ddb}_add_affected_planes()).

I think there are several scenarios we should try to hit:

1. Keep plane in async flip mode during another plane update
- ask for async flip on plane 1 to switch it to async flip mode (this may still do a sync flip internally)
- ask async flip on plane 1 again and make sure it really happend async this time
- sync update on another plane 2 (make sure it doesn't affect cdclk/ddb/etc.)
- another async flip on plane 1 (should still be in async flip mode and thus should again happen async)
2. Switch out of async flip mode on wm/ddb change
- similar as 1. except we want wm/ddb changes to affect both planes and thus plane 1 should exit async flip mode
3. Switch out of async flip mode on cdclk change
- same as 1. except we want cdclk to trigger a modeset
- should kick plane 1 out of async flip mode
- not sure if we can do this w/o affecting wm/ddb as well,
at least without hacks

4. Keep plane in async flip mode during a modeset on another pipe
- ask for async flip on plane 1 to switch it to async flip mode
(this may still do a sync flip internally)
- ask async flip on plane 1 again and make sure it really happend async this time
- modeset another pipe (make sure it doesn't trigger anything on the first pipe)
- another async flip on plane 1 (should still be in async flip mode and this be fast)
5. Switch out of async flip on modeset+ddb change
- same as 4. but have the modeset trigger a ddb reconfiguration for both pipes
- should kick plane 1 out of async flip mode
6. Switch out of async flip on cdclk change change
- same as 4. but have the modeset do a cdclk change that triggers a modeset
- should kick plane 1 out of async flip mode
- again not sure how easy it is to avoid the ddb change as well...

Quoted 52 lines
drivers/gpu/drm/i915/display/intel_atomic_plane.c +1 -0
+
 	if (new_plane_state->uapi.visible &&
 	    intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier)) {
 		new_crtc_state->data_rate_y[plane->id] =
drivers/gpu/drm/i915/display/intel_display.c +4 -3
index 72e2091d9fcb59..7bab74b2a4ae2e 100644
@@ -1292,7 +1292,8 @@ static void intel_crtc_async_flip_disable_wa(struct intel_atomic_state *state,
 		intel_atomic_get_old_crtc_state(state, crtc);
 	const struct intel_crtc_state *new_crtc_state =
 		intel_atomic_get_new_crtc_state(state, crtc);
-	u8 update_planes = new_crtc_state->update_planes;
+	u8 disable_async_flip_planes = old_crtc_state->async_flip_planes &
+				       ~new_crtc_state->async_flip_planes;
 	const struct intel_plane_state *old_plane_state;
 	struct intel_plane *plane;
 	bool need_vbl_wait = false;
@@ -1301,7 +1302,7 @@ static void intel_crtc_async_flip_disable_wa(struct intel_atomic_state *state,
 	for_each_old_intel_plane_in_state(state, plane, old_plane_state, i) {
 		if (plane->need_async_flip_disable_wa &&
 		    plane->pipe == crtc->pipe &&
-		    update_planes & BIT(plane->id)) {
+		    disable_async_flip_planes & BIT(plane->id)) {
 			/*
 			 * Apart from the async flip bit we want to
 			 * preserve the old state for the plane.
@@ -1418,7 +1419,7 @@ static void intel_pre_plane_update(struct intel_atomic_state *state,
 	 * WA for platforms where async address update enable bit
 	 * is double buffered and only latched at start of vblank.
 	 */
-	if (old_crtc_state->uapi.async_flip && !new_crtc_state->uapi.async_flip)
+	if (old_crtc_state->async_flip_planes & ~new_crtc_state->async_flip_planes)
 		intel_crtc_async_flip_disable_wa(state, crtc);
 }
 
drivers/gpu/drm/i915/display/intel_display_types.h +3 -0
index 0da9b208d56e8b..b37891a8def780 100644
@@ -1234,6 +1234,9 @@ struct intel_crtc_state {
 	/* bitmask of planes that will be updated during the commit */
 	u8 update_planes;
 
+	/* bitmask of planes with async flip active */
+	u8 async_flip_planes;
+
 	u8 framestart_delay; /* 1-4 */
 	u8 msa_timing_delay; /* 0-3 */
 
Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä
Intel