On Sat, Aug 06, 2011 at 12:57:55PM -0700, Keith Packard wrote: > On Fri, 05 Aug 2011 12:04:16 -0700, <gre...@suse.de> wrote: > > > > This is a note to let you know that I've just added the patch titled > > > > drm/i915: Hold mode_config->mutex during hotplug processing > > > > to the 3.0-stable tree which can be found at: > > > > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary > > > > The filename of the patch is: > > drm-i915-hold-mode_config-mutex-during-hotplug-processing.patch > > and it can be found in the queue-3.0 subdirectory. > > > > If you, or anyone else, feels it should not be added to the stable tree, > > please let <sta...@kernel.org> know about it. > > > > > > From a65e34c79c88895766ab1f8a5afa451eed26622b Mon Sep 17 00:00:00 2001 > > From: Keith Packard <kei...@keithp.com> > > Date: Mon, 25 Jul 2011 10:04:56 -0700 > > Subject: drm/i915: Hold mode_config->mutex during hotplug processing > > > > From: Keith Packard <kei...@keithp.com> > > > > commit a65e34c79c88895766ab1f8a5afa451eed26622b upstream. > > > > Hotplug detection is a mode setting operation and must hold the > > struct_mutex or risk colliding with other mode setting operations. > > > > In particular, the display port hotplug function attempts to re-train > > the link if the monitor is supposed to be running when plugged back > > in. If that happens while mode setting is underway, the link will get > > scrambled, leaving it in an inconsistent state. > > > > This is a special case -- usually the driver mode setting entry points > > are covered by the upper level DRM code, but in this case the function > > is invoked as a work function not under the control of DRM. > > > > Signed-off-by: Keith Packard <kei...@keithp.com> > > Reviewed-by: Jesse Barnes <jbar...@virtuousgeek.org> > > Signed-off-by: Greg Kroah-Hartman <gre...@suse.de> > > > > --- > > drivers/gpu/drm/i915/i915_irq.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > --- a/drivers/gpu/drm/i915/i915_irq.c > > +++ b/drivers/gpu/drm/i915/i915_irq.c > > @@ -306,6 +306,7 @@ static void i915_hotplug_work_func(struc > > struct drm_mode_config *mode_config = &dev->mode_config; > > struct intel_encoder *encoder; > > > > + mutex_lock(&mode_config->mutex); > > DRM_DEBUG_KMS("running encoder hotplug functions\n"); > > > > list_for_each_entry(encoder, &mode_config->encoder_list, base.head) > > @@ -314,6 +315,8 @@ static void i915_hotplug_work_func(struc > > > > /* Just fire off a uevent and let userspace tell us what to do */ > > drm_helper_hpd_irq_event(dev); > > + > > + mutex_unlock(&mode_config->mutex); > > } > > There's a fixup for this patch -- some lock debugging didn't like > holding the lock across the hpd_irq_event call. > > > 40ee3381dd1010432acc13e907329029096c5bfc > > It should be in master, but didn't get a Cc: to stable.
Thanks for letting me know, I've queued it up now as well. greg k-h _______________________________________________ stable mailing list stable@linux.kernel.org http://linux.kernel.org/mailman/listinfo/stable