drm/i915: Don't grab crtc mutexes in intel_modeset_gem_init()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 7 Jan 2014 14:15:36 +0000 (16:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jan 2014 16:27:12 +0000 (08:27 -0800)
commit4b176ae176912fbf9e19ab6313ebf1a4b6bd9b84
tree8eb0aea0127ae530d8d79c10feee1f7449a2b60b
parent3bb0df1b71413ae789767d928d9126c5a5cb1e11
drm/i915: Don't grab crtc mutexes in intel_modeset_gem_init()

commit 7ad228b11ec26a820291c9f5a1168d6176580dc1 upstream.

When the pipe A force quirk is applied the code will attempt to grab
a crtc mutex during intel_modeset_setup_hw_state(). If we're already
holding all crtc mutexes this will obviously deadlock every time.

So instead of using drm_modeset_lock_all() just grab the
mode_config.mutex. This is enough to avoid the unlocked mutex warnings
from certain lower level functions.

The regression was introduced in:

 commit 027476642811f8559cbe00ef6cc54db230e48a20
 Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
 Date:   Mon Dec 2 11:08:06 2013 +0200

    drm/i915: Take modeset locks around intel_modeset_setup_hw_state()

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[danvet: Add cc: stable since the offending commit has that, too.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/intel_display.c