diff options
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_lvds.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/oaktrail_lvds.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_intel_lvds.c | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c index 20e08e65d46c..66a41c026834 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c | |||
@@ -712,6 +712,7 @@ void cdv_intel_lvds_init(struct drm_device *dev, | |||
712 | * Attempt to get the fixed panel mode from DDC. Assume that the | 712 | * Attempt to get the fixed panel mode from DDC. Assume that the |
713 | * preferred mode is the right one. | 713 | * preferred mode is the right one. |
714 | */ | 714 | */ |
715 | mutex_lock(&dev->mode_config.mutex); | ||
715 | psb_intel_ddc_get_modes(connector, | 716 | psb_intel_ddc_get_modes(connector, |
716 | &gma_encoder->ddc_bus->adapter); | 717 | &gma_encoder->ddc_bus->adapter); |
717 | list_for_each_entry(scan, &connector->probed_modes, head) { | 718 | list_for_each_entry(scan, &connector->probed_modes, head) { |
@@ -772,10 +773,12 @@ void cdv_intel_lvds_init(struct drm_device *dev, | |||
772 | } | 773 | } |
773 | 774 | ||
774 | out: | 775 | out: |
776 | mutex_unlock(&dev->mode_config.mutex); | ||
775 | drm_sysfs_connector_add(connector); | 777 | drm_sysfs_connector_add(connector); |
776 | return; | 778 | return; |
777 | 779 | ||
778 | failed_find: | 780 | failed_find: |
781 | mutex_unlock(&dev->mode_config.mutex); | ||
779 | printk(KERN_ERR "Failed find\n"); | 782 | printk(KERN_ERR "Failed find\n"); |
780 | if (gma_encoder->ddc_bus) | 783 | if (gma_encoder->ddc_bus) |
781 | psb_intel_i2c_destroy(gma_encoder->ddc_bus); | 784 | psb_intel_i2c_destroy(gma_encoder->ddc_bus); |
diff --git a/drivers/gpu/drm/gma500/oaktrail_lvds.c b/drivers/gpu/drm/gma500/oaktrail_lvds.c index 5e0697862736..9b099468a5db 100644 --- a/drivers/gpu/drm/gma500/oaktrail_lvds.c +++ b/drivers/gpu/drm/gma500/oaktrail_lvds.c | |||
@@ -359,6 +359,7 @@ void oaktrail_lvds_init(struct drm_device *dev, | |||
359 | * if closed, act like it's not there for now | 359 | * if closed, act like it's not there for now |
360 | */ | 360 | */ |
361 | 361 | ||
362 | mutex_lock(&dev->mode_config.mutex); | ||
362 | i2c_adap = i2c_get_adapter(dev_priv->ops->i2c_bus); | 363 | i2c_adap = i2c_get_adapter(dev_priv->ops->i2c_bus); |
363 | if (i2c_adap == NULL) | 364 | if (i2c_adap == NULL) |
364 | dev_err(dev->dev, "No ddc adapter available!\n"); | 365 | dev_err(dev->dev, "No ddc adapter available!\n"); |
@@ -401,10 +402,14 @@ void oaktrail_lvds_init(struct drm_device *dev, | |||
401 | } | 402 | } |
402 | 403 | ||
403 | out: | 404 | out: |
405 | mutex_unlock(&dev->mode_config.mutex); | ||
406 | |||
404 | drm_sysfs_connector_add(connector); | 407 | drm_sysfs_connector_add(connector); |
405 | return; | 408 | return; |
406 | 409 | ||
407 | failed_find: | 410 | failed_find: |
411 | mutex_unlock(&dev->mode_config.mutex); | ||
412 | |||
408 | dev_dbg(dev->dev, "No LVDS modes found, disabling.\n"); | 413 | dev_dbg(dev->dev, "No LVDS modes found, disabling.\n"); |
409 | if (gma_encoder->ddc_bus) | 414 | if (gma_encoder->ddc_bus) |
410 | psb_intel_i2c_destroy(gma_encoder->ddc_bus); | 415 | psb_intel_i2c_destroy(gma_encoder->ddc_bus); |
diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c index 32342f6990d9..891a028a0826 100644 --- a/drivers/gpu/drm/gma500/psb_intel_lvds.c +++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c | |||
@@ -777,6 +777,7 @@ void psb_intel_lvds_init(struct drm_device *dev, | |||
777 | * Attempt to get the fixed panel mode from DDC. Assume that the | 777 | * Attempt to get the fixed panel mode from DDC. Assume that the |
778 | * preferred mode is the right one. | 778 | * preferred mode is the right one. |
779 | */ | 779 | */ |
780 | mutex_lock(&dev->mode_config.mutex); | ||
780 | psb_intel_ddc_get_modes(connector, &lvds_priv->ddc_bus->adapter); | 781 | psb_intel_ddc_get_modes(connector, &lvds_priv->ddc_bus->adapter); |
781 | list_for_each_entry(scan, &connector->probed_modes, head) { | 782 | list_for_each_entry(scan, &connector->probed_modes, head) { |
782 | if (scan->type & DRM_MODE_TYPE_PREFERRED) { | 783 | if (scan->type & DRM_MODE_TYPE_PREFERRED) { |
@@ -827,10 +828,12 @@ void psb_intel_lvds_init(struct drm_device *dev, | |||
827 | * actually having one. | 828 | * actually having one. |
828 | */ | 829 | */ |
829 | out: | 830 | out: |
831 | mutex_unlock(&dev->mode_config.mutex); | ||
830 | drm_sysfs_connector_add(connector); | 832 | drm_sysfs_connector_add(connector); |
831 | return; | 833 | return; |
832 | 834 | ||
833 | failed_find: | 835 | failed_find: |
836 | mutex_unlock(&dev->mode_config.mutex); | ||
834 | if (lvds_priv->ddc_bus) | 837 | if (lvds_priv->ddc_bus) |
835 | psb_intel_i2c_destroy(lvds_priv->ddc_bus); | 838 | psb_intel_i2c_destroy(lvds_priv->ddc_bus); |
836 | failed_ddc: | 839 | failed_ddc: |