Skip to content

Commit

Permalink
drm/i915: Don't grab crtc mutexes in intel_modeset_gem_init()
Browse files Browse the repository at this point in the history
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 0274766
 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>
Cc: stable@vger.kernel.org
[danvet: Add cc: stable since the offending commit has that, too.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>


---
yaml
---
svn_rev: 414454
current_ref: refs/heads/rpi-3.18.y
current_commit: 7ad228b
head_branch: refs/heads/rpi-3.18.y
migrated_from: v3
  • Loading branch information
vsyrjala authored and danvet committed Jan 10, 2014
1 parent 165fd5e commit 22fa446
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/rpi-3.18.y: 0882dae983707455e97479e5e904e37673517ebc
refs/heads/rpi-3.18.y: 7ad228b11ec26a820291c9f5a1168d6176580dc1
4 changes: 2 additions & 2 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -11053,10 +11053,10 @@ void intel_modeset_gem_init(struct drm_device *dev)

intel_setup_overlay(dev);

drm_modeset_lock_all(dev);
mutex_lock(&dev->mode_config.mutex);
drm_mode_config_reset(dev);
intel_modeset_setup_hw_state(dev, false);
drm_modeset_unlock_all(dev);
mutex_unlock(&dev->mode_config.mutex);
}

void intel_modeset_cleanup(struct drm_device *dev)
Expand Down

0 comments on commit 22fa446

Please sign in to comment.