Skip to contentSkip to conversation

drm/i915/skl: Don't try to update plane watermarks if they haven't changed

PATCH New Lyude 2 participants 2 messages Aug 26, 2016

Subsystems (2)
lore
Share & tools
lore

Lyude

author
#0 lore raw

PATCH 1/1 drm/i915/skl: Don't try to update plane watermarks if they haven't changed

i915 sometimes needs to disable planes in the middle of an atomic commit, and then reenable them later in the same commit. Because of this, we can't make the assumption that the state of the plane actually changed. Since the state of the plane hasn't actually changed, neither have it's watermarks. And if the watermarks hasn't changed then we haven't populated skl_results with anything, which means we'll end up zeroing out a plane's watermarks in the middle of the atomic commit without restoring them later.

Cc Maarten Lankhorst <[email protected]>
Fixes 62e0fb880123 ("drm/i915/skl: Update plane watermarks atomically

during plane updates")

---
 drivers/gpu/drm/i915/intel_display.c |  8 +++++++-
 drivers/gpu/drm/i915/intel_sprite.c  | 10 ++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_display.c +7 -1
index e4e6141..8faf738 100644
@@ -3448,7 +3448,13 @@ static void skylake_disable_primary_plane(struct drm_plane *primary,
 	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 	int pipe = intel_crtc->pipe;
 
-	skl_write_plane_wm(intel_crtc, &dev_priv->wm.skl_results, 0);
+	/*
+	 * We only populate skl_results on watermark updates, and if the
+	 * plane's visiblity isn't actually changing neither is it's
+	 * watermarks.
+	 */
+	if (!crtc->primary->state->visible)
+		skl_write_plane_wm(intel_crtc, &dev_priv->wm.skl_results, 0);
 
 	I915_WRITE(PLANE_CTL(pipe, 0), 0);
 	I915_WRITE(PLANE_SURF(pipe, 0), 0);
drivers/gpu/drm/i915/intel_sprite.c +8 -2
index 0df783a..f51a70c 100644
@@ -292,8 +292,14 @@ skl_disable_plane(struct drm_plane *dplane, struct drm_crtc *crtc)
 	const int pipe = intel_plane->pipe;
 	const int plane = intel_plane->plane + 1;
 
-	skl_write_plane_wm(to_intel_crtc(crtc), &dev_priv->wm.skl_results,
-			   plane);
+	/*
+	 * We only populate skl_results on watermark updates, and if the
+	 * plane's visiblity isn't actually changing neither is it's
+	 * watermarks.
+	 */
+	if (!dplane->state->visible)
+		skl_write_plane_wm(to_intel_crtc(crtc),
+				   &dev_priv->wm.skl_results, plane);
 
 	I915_WRITE(PLANE_CTL(pipe, plane), 0);
 
Signature · 6 lines
2.7.4

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

✓ Fi.CI.BAT: success for drm/i915/skl: Don't try to update plane watermarks if they haven't changed

== Series Details ==

== Series Details ==

Series: drm/i915/skl: Don't try to update plane watermarks if they haven't changed
URL : https://patchwork.freedesktop.org/series/11654/
State : success

== Summary ==

Series 11654v1 drm/i915/skl: Don't try to update plane watermarks if they haven't changed
http://patchwork.freedesktop.org/api/1.0/series/11654/revisions/1/mbox/

Test drv_module_reload_basic:

                skip       -> PASS       (fi-skl-6260u)
Test gem_exec_suspend:
        Subgroup basic-s3:
                incomplete -> PASS       (fi-hsw-4770k)
fi-bdw-5557u     total:252  pass:235  dwarn:0   dfail:0   fail:2   skip:15 
fi-bsw-n3050     total:252  pass:205  dwarn:0   dfail:0   fail:1   skip:46 
fi-byt-n2820     total:252  pass:207  dwarn:0   dfail:0   fail:3   skip:42 
fi-hsw-4770k     total:204  pass:183  dwarn:0   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:252  pass:224  dwarn:0   dfail:0   fail:2   skip:26 
fi-ivb-3520m     total:252  pass:220  dwarn:0   dfail:0   fail:1   skip:31 
fi-skl-6260u     total:252  pass:236  dwarn:0   dfail:0   fail:2   skip:14 
fi-skl-6700k     total:252  pass:222  dwarn:0   dfail:0   fail:2   skip:28 
fi-snb-2520m     total:252  pass:207  dwarn:0   dfail:0   fail:2   skip:43 
fi-snb-2600      total:252  pass:207  dwarn:0   dfail:0   fail:2   skip:43 

Results at /archive/results/CI_IGT_test/Patchwork_2439/

6068022442b9e3760829afb40fc87c3407141461 drm-intel-nightly: 2016y-08m-26d-19h-31m-08s UTC integration manifest b3ae868 drm/i915/skl: Don't try to update plane watermarks if they haven't changed

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