* [PATCH] drm/i915: Fix deadlock during driver init on ILK
@ 2014-04-25 19:11 ville.syrjala
2014-04-25 20:32 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: ville.syrjala @ 2014-04-25 19:11 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
We have a struct_mutex deadlock during driver init on ILK
[ 54.320273] =============================================
[ 54.320371] [ INFO: possible recursive locking detected ]
[ 54.320471] 3.15.0-rc2-flip_race+ #2 Not tainted
[ 54.320567] ---------------------------------------------
[ 54.320665] modprobe/2178 is trying to acquire lock:
[ 54.320762] (&dev->struct_mutex){+.+.+.}, at: [<ffffffffa0568b05>] intel_enable_gt_powersave+0xa5/0x9d0 [i915]
[ 54.321111]
[ 54.321111] but task is already holding lock:
[ 54.321250] (&dev->struct_mutex){+.+.+.}, at: [<ffffffffa05b4c2e>] intel_modeset_init_hw+0x3e/0x60 [i915]
[ 54.321583]
[ 54.321583] other info that might help us debug this:
[ 54.321724] Possible unsafe locking scenario:
[ 54.321724]
[ 54.321863] CPU0
[ 54.321954] ----
[ 54.322046] lock(&dev->struct_mutex);
[ 54.322221] lock(&dev->struct_mutex);
[ 54.322397]
[ 54.322397] *** DEADLOCK ***
[ 54.322397]
[ 54.322638] May be due to missing lock nesting notation
[ 54.322638]
[ 54.322781] 4 locks held by modprobe/2178:
[ 54.322875] #0: (&dev->mutex){......}, at: [<ffffffff813592eb>] __driver_attach+0x5b/0xb0
[ 54.323230] #1: (&dev->mutex){......}, at: [<ffffffff813592f9>] __driver_attach+0x69/0xb0
[ 54.323582] #2: (drm_global_mutex){+.+.+.}, at: [<ffffffffa04e1e0d>] drm_dev_register+0x2d/0x120 [drm]
[ 54.323945] #3: (&dev->struct_mutex){+.+.+.}, at: [<ffffffffa05b4c2e>] intel_modeset_init_hw+0x3e/0x60 [i915]
This regression got introduced in:
commit 586d5270b60dc1f35cc3ca982d403765bad77965
Author: Imre Deak <imre.deak@intel.com>
Date: Mon Apr 14 20:24:28 2014 +0300
drm/i915: move getting struct_mutex lower in the callstack during GPU reset
Fix the problem by not taking struct_mutex around intel_enable_gt_powersave()
in intel_modeset_init_hw() since intel_enable_gt_powersave() now grabs the
mutex itself.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b57210c..9eed837 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11261,9 +11261,7 @@ void intel_modeset_init_hw(struct drm_device *dev)
intel_reset_dpio(dev);
- mutex_lock(&dev->struct_mutex);
intel_enable_gt_powersave(dev);
- mutex_unlock(&dev->struct_mutex);
}
void intel_modeset_suspend_hw(struct drm_device *dev)
--
1.8.3.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] drm/i915: Fix deadlock during driver init on ILK
2014-04-25 19:11 [PATCH] drm/i915: Fix deadlock during driver init on ILK ville.syrjala
@ 2014-04-25 20:32 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2014-04-25 20:32 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx
On Fri, Apr 25, 2014 at 10:11:51PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We have a struct_mutex deadlock during driver init on ILK
>
> [ 54.320273] =============================================
> [ 54.320371] [ INFO: possible recursive locking detected ]
> [ 54.320471] 3.15.0-rc2-flip_race+ #2 Not tainted
> [ 54.320567] ---------------------------------------------
> [ 54.320665] modprobe/2178 is trying to acquire lock:
> [ 54.320762] (&dev->struct_mutex){+.+.+.}, at: [<ffffffffa0568b05>] intel_enable_gt_powersave+0xa5/0x9d0 [i915]
> [ 54.321111]
> [ 54.321111] but task is already holding lock:
> [ 54.321250] (&dev->struct_mutex){+.+.+.}, at: [<ffffffffa05b4c2e>] intel_modeset_init_hw+0x3e/0x60 [i915]
> [ 54.321583]
> [ 54.321583] other info that might help us debug this:
> [ 54.321724] Possible unsafe locking scenario:
> [ 54.321724]
> [ 54.321863] CPU0
> [ 54.321954] ----
> [ 54.322046] lock(&dev->struct_mutex);
> [ 54.322221] lock(&dev->struct_mutex);
> [ 54.322397]
> [ 54.322397] *** DEADLOCK ***
> [ 54.322397]
> [ 54.322638] May be due to missing lock nesting notation
> [ 54.322638]
> [ 54.322781] 4 locks held by modprobe/2178:
> [ 54.322875] #0: (&dev->mutex){......}, at: [<ffffffff813592eb>] __driver_attach+0x5b/0xb0
> [ 54.323230] #1: (&dev->mutex){......}, at: [<ffffffff813592f9>] __driver_attach+0x69/0xb0
> [ 54.323582] #2: (drm_global_mutex){+.+.+.}, at: [<ffffffffa04e1e0d>] drm_dev_register+0x2d/0x120 [drm]
> [ 54.323945] #3: (&dev->struct_mutex){+.+.+.}, at: [<ffffffffa05b4c2e>] intel_modeset_init_hw+0x3e/0x60 [i915]
>
> This regression got introduced in:
> commit 586d5270b60dc1f35cc3ca982d403765bad77965
> Author: Imre Deak <imre.deak@intel.com>
> Date: Mon Apr 14 20:24:28 2014 +0300
>
> drm/i915: move getting struct_mutex lower in the callstack during GPU reset
>
> Fix the problem by not taking struct_mutex around intel_enable_gt_powersave()
> in intel_modeset_init_hw() since intel_enable_gt_powersave() now grabs the
> mutex itself.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-25 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25 19:11 [PATCH] drm/i915: Fix deadlock during driver init on ILK ville.syrjala
2014-04-25 20:32 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox