mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	airlied@linux.ie, daniel.vetter@ffwll.ch
Subject: Re: drm: i915+fb: crtc->lock recursive locking deadlock on VT switch [>= 3.9-rc1 regresion]
Date: Sat, 13 Apr 2013 18:10:40 +0100	[thread overview]
Message-ID: <20130413171040.GA24925@cantiga.alporthouse.com> (raw)
In-Reply-To: <20130413154146.GA8136@shrek.podlesie.net>

On Sat, Apr 13, 2013 at 05:41:46PM +0200, Krzysztof Mazur wrote:
> Hi,
> 
> the drm_fb_helper_hotplug_event() locks all crtc->mutex locks by calling
> drm_modeset_lock_all() and later calls drm_fb_helper_probe_connector_modes(),
> which in case of i915 DRM driver effectively calls
> intel_get_load_detect_pipe() that tries to lock crtc->mutex again.
> This causes a deadlock, and can be in some cases triggered by VT
> switch to framebuffer console on i915.
> 
> This bug is introduced in Linux 3.9-rc1 and still exists
> in v3.9-rc6-183-gbf81710. Linux 3.8 is ok.

In Dave's drm-fixes branch:

commit 89ced125472b8551c65526934b7f6c733a6864fa
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Apr 11 14:26:55 2013 +0000

    drm/fb-helper: Fix locking in drm_fb_helper_hotplug_event
    
    Driver's and ->fill_modes functions are allowed to grab crtc mutexes
    (for e.g. load detect). Hence we need to first only grab the general
    kms mutex, and only in a second step grab all locks to do the
    modesets.
    
    This prevents a deadlock on my gm45 in the tv load detect code called
    by drm_helper_probe_single_connector_modes.
    
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2013-04-13 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13 15:41 Krzysztof Mazur
2013-04-13 17:10 ` Chris Wilson [this message]
2013-04-14  6:47   ` Krzysztof Mazur

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=20130413171040.GA24925@cantiga.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krzysiek@podlesie.net \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®