Patch "drm/i915: Fix deadlock in i830_disable_pipe()" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/i915: Fix deadlock in i830_disable_pipe()
to the 4.14-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-fix-deadlock-in-i830_disable_pipe.patch
and it can be found in the queue-4.14 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
4488496d58200c7511842e049a4cc891d928da56Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Wed, 29 Nov 2017 14:54:11 +0200
Subject: drm/i915: Fix deadlock in i830_disable_pipe()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Ville Syrjälä <[email protected]>
commit 4488496d58200c7511842e049a4cc891d928da56 upstream.
i830_disable_pipe() gets called from the power well code, and thus we're already holding the power domain mutex. That means we can't call plane->get_hw_state() as it will also try to grab the same mutex and will thus deadlock.
Replace the assert_plane() calls (which calls ->get_hw_state()) with just raw register reads in i830_disable_pipe(). As a bonus we can now get a warning if plane C is enabled even though we don't even expose it as a drm plane.
v2: Do a separate WARN_ON() for each plane (Chris)
--- drivers/gpu/drm/i915/intel_display.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +5 -2
@@ -14717,8 +14717,11 @@ void i830_disable_pipe(struct drm_i915_pDRM_DEBUG_KMS ("disabling pipe %c due to force quirk\n" ,pipe_name (pipe)); -assert_planes_disabled (intel_get_crtc_for_pipe (dev_priv,PIPE_A )); -assert_planes_disabled (intel_get_crtc_for_pipe (dev_priv,PIPE_B )); +WARN_ON (I915_READ (DSPCNTR (PLANE_A )) &DISPLAY_PLANE_ENABLE ); +WARN_ON (I915_READ (DSPCNTR (PLANE_B )) &DISPLAY_PLANE_ENABLE ); +WARN_ON (I915_READ (DSPCNTR (PLANE_C )) &DISPLAY_PLANE_ENABLE ); +WARN_ON (I915_READ (CURCNTR (PIPE_A )) &CURSOR_MODE ); +WARN_ON (I915_READ (CURCNTR (PIPE_B )) &CURSOR_MODE );I915_WRITE (PIPECONF (pipe),0 );POSTING_READ (PIPECONF (pipe));
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/drm-i915-redo-plane-sanitation-during-readout.patch queue-4.14/drm-i915-add-.get_hw_state-method-for-planes.patch queue-4.14/drm-i915-fix-deadlock-in-i830_disable_pipe.patch