All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 89366] DisplayPort MST (multi-stream transport) "atomic sleep" Linux kernel bug
Date: Sat, 28 Feb 2015 07:19:18 +0000	[thread overview]
Message-ID: <bug-89366-502@http.bugs.freedesktop.org/> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2207 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=89366

            Bug ID: 89366
           Summary: DisplayPort MST (multi-stream transport) "atomic
                    sleep" Linux kernel bug
           Product: DRI
           Version: unspecified
          Hardware: x86 (IA32)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: General
          Assignee: dri-devel@lists.freedesktop.org
          Reporter: adam_richter2004@yahoo.com

[This is a slightly edited version of an email that I attempted to send to the
dri-devel mailing list.]

CONFIG_DEBUG_ATOMIC_SLEEP complains about the following locking problem in
linux-4.0-rc1/drivers/gpu/drm/drm_dp_mst_topology.c:

drm_dp_mst_wait_tx_reply --> wait_event_timeout --> check_txmsg_state  -->
mutex_lock

I believe that any function called in the "condition" argument in the
wait_event_timeout macro (in this case, check_txmsg_state) is not allowed to
block when the condition is being evalutated to determine whether to unblock
the process.

I think the problem is real.  On two different computers and three different
DisplayPort MST hubs, plugging in a DisplayPort hub or having it plugged in
from boot time results in a hang within a few minutes of doing a few "xrandr"
commands.

At first glance, it looked to me like it might be safe to remove the
mutex_{,un}lock calls from check_txmsg_state (which is not called from anywhere
else), and change the integer field txmsg->state to be an atomic_t (although
I'd be surprised if there is existing hardware that supports an MST hub where
the accessing that field is not atomic.  However, altough removing those mutex
calls eliminated the complaint from CONFIG_DEBUG_ATOMIC_SLEEP, it also resulted
in the system sometimes seeming to ignore the MST hub and otherwise eventually
getting a kernel memory fault in the DisplayPort MST code or another
spontaneous reset (possibly deadlock follwed by a watchdog reset).

Advice is welcome, although I am not blocked in my own efforts to analyze this
further.  I plan to post updates when I have more news.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3491 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2015-02-28  7:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-28  7:19 bugzilla-daemon [this message]
2015-03-05  2:00 ` [Bug 89366] DisplayPort MST (multi-stream transport) "atomic sleep" Linux kernel bug bugzilla-daemon

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=bug-89366-502@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /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.