Skip to contentSkip to conversation

Patch "drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2." has been added to the 4.11-stable tree

PATCH [email protected] 1 participant 1 message Jun 15, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2.

to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-i915-always-recompute-watermarks-when-distrust_bios_wm-is-set-v2.patch
and it can be found in the queue-4.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 4e3aed844547f63614363a386de126e6304e55fb Mon Sep 17 00:00:00 2001

From: Maarten Lankhorst <[email protected]>
Date: Wed, 31 May 2017 17:42:36 +0200
Subject: drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2.

From: Maarten Lankhorst <[email protected]>

commit 4e3aed844547f63614363a386de126e6304e55fb upstream.

On some systems there can be a race condition in which no crtc state is added to the first atomic commit. This results in all crtc's having a null DDB allocation, causing a FIFO underrun on any update until the first modeset.

Changes since v1:
- Do not take the connection_mutex, this is already done below.

Fixes 98d39494d375 ("drm/i915/gen9: Compute DDB allocation at atomic

check time (v4)")

(cherry picked from commit 367d73d2806085bb507ab44c1f532640917fd5ca)
---
 drivers/gpu/drm/i915/intel_pm.c |    9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +9 -0
@@ -4140,11 +4140,19 @@ skl_compute_wm(struct drm_atomic_state *
 	struct drm_crtc_state *cstate;
 	struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
 	struct skl_wm_values *results = &intel_state->wm_results;
+	struct drm_device *dev = state->dev;
 	struct skl_pipe_wm *pipe_wm;
 	bool changed = false;
 	int ret, i;
 
 	/*
+	 * When we distrust bios wm we always need to recompute to set the
+	 * expected DDB allocations for each CRTC.
+	 */
+	if (to_i915(dev)->wm.distrust_bios_wm)
+		changed = true;
+
+	/*
 	 * If this transaction isn't actually touching any CRTC's, don't
 	 * bother with watermark calculation.  Note that if we pass this
 	 * test, we're guaranteed to hold at least one CRTC state mutex,
@@ -4154,6 +4162,7 @@ skl_compute_wm(struct drm_atomic_state *
 	 */
 	for_each_crtc_in_state(state, crtc, cstate, i)
 		changed = true;
+
 	if (!changed)
 		return 0;
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.11/drm-i915-always-recompute-watermarks-when-distrust_bios_wm-is-set-v2.patch queue-4.11/drm-i915-fix-90-270-rotated-coordinates-for-fbc.patch