Skip to contentSkip to conversation

drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs

PATCH Superseded Imre Deak 2 participants 4 messages Jul 22, 2016 – Jul 23, 2016

Subsystems (2)
lore
Share & tools
lore

Imre Deak

author
#0 lore raw

PATCH 1/1 drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs

Currently on GEN9 if multiple outputs are disabled atomically we'll program the disabled watermark and DDB values for the 2nd, 3rd pipe to be disabled too early while the pipes are still active. Fix this by updating the watermark and DDB values only after all the selected pipes are disabled already. This fixed FIFO underflows during suspend to ram and disk on my BXT.

CC: Matt Roper <[email protected]>
CC: Ville Syrjälä <[email protected]>
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=96914
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=96915

---
 drivers/gpu/drm/i915/intel_display.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_display.c +5 -3
index 78beb7e..3c0c2d6 100644
@@ -13682,12 +13682,14 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 			 */
 			intel_check_cpu_fifo_underruns(dev_priv);
 			intel_check_pch_fifo_underruns(dev_priv);
-
-			if (!crtc->state->active)
-				intel_update_watermarks(crtc);
 		}
 	}
 
+	for_each_crtc_in_state(state, crtc, old_crtc_state, i) {
+		if (needs_modeset(crtc->state) && !crtc->state->active)
+			intel_update_watermarks(crtc);
+	}
+
 	/* Only after disabling all output pipelines that will be changed can we
 	 * update the the output configuration. */
 	intel_modeset_update_crtc_state(state);
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Ro.CI.BAT: warning for drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs

== Series Details ==

== Series Details ==

Series: drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs
URL : https://patchwork.freedesktop.org/series/10206/
State : warning

== Summary ==

Series 10206v1 drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs
http://patchwork.freedesktop.org/api/1.0/series/10206/revisions/1/mbox

Test drv_module_reload_basic:

                skip       -> PASS       (ro-ivb-i7-3770)
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                pass       -> DMESG-WARN (ro-byt-n2820)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (ro-bdw-i7-5557U)
ro-bdw-i5-5250u  total:244  pass:219  dwarn:4   dfail:0   fail:8   skip:13 
ro-bdw-i7-5557U  total:244  pass:221  dwarn:2   dfail:0   fail:8   skip:13 
ro-bdw-i7-5600u  total:244  pass:204  dwarn:0   dfail:0   fail:8   skip:32 
ro-bsw-n3050     total:218  pass:172  dwarn:1   dfail:0   fail:2   skip:42 
ro-byt-n2820     total:244  pass:196  dwarn:1   dfail:0   fail:9   skip:38 
ro-hsw-i3-4010u  total:244  pass:212  dwarn:0   dfail:0   fail:8   skip:24 
ro-hsw-i7-4770r  total:244  pass:212  dwarn:0   dfail:0   fail:8   skip:24 
ro-ilk-i7-620lm  total:244  pass:172  dwarn:0   dfail:0   fail:9   skip:63 
ro-ilk1-i5-650   total:239  pass:172  dwarn:0   dfail:0   fail:9   skip:58 
ro-ivb-i7-3770   total:244  pass:203  dwarn:0   dfail:0   fail:8   skip:33 
ro-skl3-i5-6260u total:244  pass:224  dwarn:0   dfail:0   fail:8   skip:12 
ro-snb-i7-2620M  total:244  pass:193  dwarn:0   dfail:0   fail:9   skip:42 

Results at /archive/results/CI_IGT_test/RO_Patchwork_1583/

03d2b78 drm-intel-nightly: 2016y-07m-22d-17h-52m-13s UTC integration manifest 4fb555e drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#2 lore raw

PATCH v2 1/1 drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs

In reply to Imre Deak

Currently on GEN9 if multiple outputs are disabled atomically we'll program the disabled watermark and DDB values for the 2nd, 3rd pipe to be disabled too early while the pipes are still active. Fix this by updating the watermark and DDB values only after all the selected pipes are disabled already. This fixed FIFO underflows during suspend to ram and disk on my BXT.

v2:
- Update watermarks only if old crtc state was active

CC: Matt Roper <[email protected]>
CC: Ville Syrjälä <[email protected]>
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=96914
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=96915

---
 drivers/gpu/drm/i915/intel_display.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_display.c +6 -3
index 78beb7e..a5345cc 100644
@@ -13682,12 +13682,15 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 			 */
 			intel_check_cpu_fifo_underruns(dev_priv);
 			intel_check_pch_fifo_underruns(dev_priv);
-
-			if (!crtc->state->active)
-				intel_update_watermarks(crtc);
 		}
 	}
 
+	for_each_crtc_in_state(state, crtc, old_crtc_state, i) {
+		if (needs_modeset(crtc->state) &&
+		    old_crtc_state->active && !crtc->state->active)
+			intel_update_watermarks(crtc);
+	}
+
 	/* Only after disabling all output pipelines that will be changed can we
 	 * update the the output configuration. */
 	intel_modeset_update_crtc_state(state);
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

✗ Ro.CI.BAT: failure for drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs (rev2)

In reply to Imre Deak
== Series Details ==

== Series Details ==

Series: drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs (rev2)
URL : https://patchwork.freedesktop.org/series/10206/
State : failure

== Summary ==

Series 10206v2 drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs
http://patchwork.freedesktop.org/api/1.0/series/10206/revisions/2/mbox

Test drv_module_reload_basic:

                skip       -> PASS       (ro-ivb-i7-3770)
Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> FAIL       (ro-hsw-i7-4770r)
ro-bdw-i5-5250u  total:244  pass:219  dwarn:4   dfail:0   fail:8   skip:13 
ro-bdw-i7-5557U  total:244  pass:220  dwarn:3   dfail:0   fail:8   skip:13 
ro-bdw-i7-5600u  total:244  pass:204  dwarn:0   dfail:0   fail:8   skip:32 
ro-bsw-n3050     total:218  pass:173  dwarn:0   dfail:0   fail:2   skip:42 
ro-byt-n2820     total:244  pass:197  dwarn:0   dfail:0   fail:9   skip:38 
ro-hsw-i3-4010u  total:244  pass:212  dwarn:0   dfail:0   fail:8   skip:24 
ro-hsw-i7-4770r  total:244  pass:211  dwarn:0   dfail:0   fail:9   skip:24 
ro-ilk-i7-620lm  total:244  pass:172  dwarn:0   dfail:0   fail:9   skip:63 
ro-ilk1-i5-650   total:239  pass:172  dwarn:0   dfail:0   fail:9   skip:58 
ro-ivb-i7-3770   total:244  pass:203  dwarn:0   dfail:0   fail:8   skip:33 
ro-skl3-i5-6260u total:244  pass:224  dwarn:0   dfail:0   fail:8   skip:12 
ro-snb-i7-2620M  total:244  pass:193  dwarn:0   dfail:0   fail:9   skip:42 

Results at /archive/results/CI_IGT_test/RO_Patchwork_1588/

03d2b78 drm-intel-nightly: 2016y-07m-22d-17h-52m-13s UTC integration manifest d195b86 drm/i915/gen9: Fix FIFO underflows when disabling multiple outputs

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx