mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
drm/i915: Fix deadlock in i830_disable_pipe()
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) Cc: Chris Wilson <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Fixes:d87ce76402("drm/i915: Add .get_hw_state() method for planes") Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit5816d9cbc0) Signed-off-by: Jani Nikula <[email protected]>
This commit is contained in:
parent
23ac127328
commit
4488496d58
1 changed files with 5 additions and 2 deletions
|
|
@ -14684,8 +14684,11 @@ void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
|
|||
DRM_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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue