[lkml]   [2011]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] drm/i915: Hold struct_mutex during hotplug processing
    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.

    Signed-off-by: Keith Packard <>
    drivers/gpu/drm/i915/i915_irq.c | 3 +++
    1 files changed, 3 insertions(+), 0 deletions(-)

    diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
    index 3b03f85..5fe8f28 100644
    --- a/drivers/gpu/drm/i915/i915_irq.c
    +++ b/drivers/gpu/drm/i915/i915_irq.c
    @@ -306,12 +306,15 @@ static void i915_hotplug_work_func(struct work_struct *work)
    struct drm_mode_config *mode_config = &dev->mode_config;
    struct intel_encoder *encoder;

    + mutex_lock(&dev_priv->dev->struct_mutex);
    DRM_DEBUG_KMS("running encoder hotplug functions\n");

    list_for_each_entry(encoder, &mode_config->encoder_list, base.head)
    if (encoder->hot_plug)

    + mutex_unlock(&dev_priv->dev->struct_mutex);
    /* Just fire off a uevent and let userspace tell us what to do */

     \ /
      Last update: 2011-07-25 19:13    [W:0.049 / U:23.760 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site