aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2015-03-09 15:08:37 -0400
committerDave Airlie <airlied@redhat.com>2015-03-09 18:39:05 -0400
commit3a656b54c8433ada6dd7ee6227854c48682d5e4d (patch)
treefe7f09ee5d8f5455b81124aadcfac41df7f64030
parenta8c6ecb3be7029881f7c95e5e201a629094a4e1a (diff)
drm/i915: Fix struct_mutex deadlock due to merge fumble
commit a8c6ecb3be7029881f7c95e5e201a629094a4e1a Merge: 8dd0eb35 9eccca0 Author: Dave Airlie <airlied@redhat.com> Date: Mon Mar 9 19:58:30 2015 +1000 Merge tag 'v4.0-rc3' into drm-next managed to pick the wrong code to resolve the conflict and left us with a mutex_lock(struct_mutex) without the mutex_unlock(struct_mutex) leading to a deadlock. Fix the problem by recovering the correct code which doesn't need the lock. Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 31f3b11589b9..1aa1cbd16c19 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12295,9 +12295,7 @@ intel_check_cursor_plane(struct drm_plane *plane,
12295 return -ENOMEM; 12295 return -ENOMEM;
12296 } 12296 }
12297 12297
12298 /* we only need to pin inside GTT if cursor is non-phy */ 12298 if (fb->modifier[0] != DRM_FORMAT_MOD_NONE) {
12299 mutex_lock(&dev->struct_mutex);
12300 if (!INTEL_INFO(dev)->cursor_needs_physical && obj->tiling_mode) {
12301 DRM_DEBUG_KMS("cursor cannot be tiled\n"); 12299 DRM_DEBUG_KMS("cursor cannot be tiled\n");
12302 ret = -EINVAL; 12300 ret = -EINVAL;
12303 } 12301 }