All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Ben Skeggs <bskeggs@redhat.com>, dri-devel@lists.freedesktop.org
Subject: Re: 4.9-rc1 lockdep warning suggesting a deadlock between nouveau and i915 with prime video outputs active
Date: Wed, 9 Nov 2016 17:26:00 +0000	[thread overview]
Message-ID: <20161109172600.GB9300@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <36638da4-8cf3-6fb6-26a0-8e9c4a0e2e05@redhat.com>

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-11-09 17:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 17:02 4.9-rc1 lockdep warning suggesting a deadlock between nouveau and i915 with prime video outputs active Hans de Goede
2016-11-09 17:26 ` Chris Wilson [this message]
2016-11-09 18:36   ` Hans de Goede
2017-07-13 13:57   ` Jiri Slaby
2017-07-13 14:01     ` Peter Zijlstra
2017-07-13 14:04     ` Chris Wilson
2017-07-13 18:59       ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161109172600.GB9300@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.