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); } static void i915_handle_rps_change(struct drm_device *dev) Patches currently in stable-queue which might be from kei...@keithp.com are queue-3.0/drm-i915-fix-typo-in-drm_i915_overlay_put_image-ioctl.patch queue-3.0/drm-i915-load-the-lut-before-pipe-enable-on-ilk.patch queue-3.0/drm-i915-hold-mode_config-mutex-during-hotplug-processing.patch queue-3.0/drm-i915-initialize-rcs-ring-status-page-address-in.patch queue-3.0/drm-i915-pch-fix-integer-math-bugs-in-panel-fitting.patch _______________________________________________ stable mailing list stable@linux.kernel.org http://linux.kernel.org/mailman/listinfo/stable