4.9-rc1 lockdep warning suggesting a deadlock between nouveau and i915 with prime video outputs active
Chris Wilson
chris at chris-wilson.co.uk
Wed Nov 9 17:26:00 UTC 2016
On Wed, Nov 09, 2016 at 06:02:40PM +0100, Hans de Goede wrote:
> Hi,
>
> I noticed this while testing the displayport output attached
> to the nvidia GPU on a Thinkpad P50 while the intel GPU
> was driving the LCD panel (and was the primary GPU according
> to Xorg). This was while logging into gnome-3 with Xorg-1.19-rc2,
> from gdm (also running on top of Xorg-1.19-rc2).
Worth trying
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 6efdba4993fc..3e4dc782812d 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -505,7 +505,9 @@ int drm_dev_init(struct drm_device *dev,
spin_lock_init(&dev->buf_lock);
spin_lock_init(&dev->event_lock);
- mutex_init(&dev->struct_mutex);
+ __mutex_init(&dev->struct_mutex,
+ "struct_mutex",
+ &dev->struct_mutex_class);
mutex_init(&dev->filelist_mutex);
mutex_init(&dev->ctxlist_mutex);
mutex_init(&dev->master_mutex);
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index ae49c3174d24..ed2e53534c2e 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -808,6 +808,7 @@ struct drm_device {
/** \name Locks */
/*@{ */
+ struct lock_class_key struct_mutex_class;
struct mutex struct_mutex; /**< For others */
struct mutex master_mutex; /**< For drm_minor::master and drm_file::is_master */
/*@} */
to test for a false positive first.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the dri-devel
mailing list