diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 2ff4a5cb2d5..9177c17853e 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -474,11 +474,12 @@ static int intel_lvds_get_modes(struct drm_connector *connector) | |||
474 | { | 474 | { |
475 | struct intel_lvds *intel_lvds = intel_attached_lvds(connector); | 475 | struct intel_lvds *intel_lvds = intel_attached_lvds(connector); |
476 | struct drm_device *dev = connector->dev; | 476 | struct drm_device *dev = connector->dev; |
477 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
477 | struct drm_display_mode *mode; | 478 | struct drm_display_mode *mode; |
478 | 479 | ||
479 | if (intel_lvds->edid_good) { | 480 | if (intel_lvds->edid_good) { |
480 | int ret = intel_ddc_get_modes(connector, | 481 | int ret = intel_ddc_get_modes(connector, |
481 | intel_lvds->base.ddc_bus); | 482 | &dev_priv->gmbus[GMBUS_PORT_PANEL].adapter); |
482 | if (ret) | 483 | if (ret) |
483 | return ret; | 484 | return ret; |
484 | } | 485 | } |
@@ -898,21 +899,12 @@ void intel_lvds_init(struct drm_device *dev) | |||
898 | * if closed, act like it's not there for now | 899 | * if closed, act like it's not there for now |
899 | */ | 900 | */ |
900 | 901 | ||
901 | /* Set up the DDC bus. */ | ||
902 | intel_encoder->ddc_bus = intel_i2c_create(intel_encoder, | ||
903 | gpio, "LVDSDDC_C"); | ||
904 | if (!intel_encoder->ddc_bus) { | ||
905 | dev_printk(KERN_ERR, &dev->pdev->dev, "DDC bus registration " | ||
906 | "failed.\n"); | ||
907 | goto failed; | ||
908 | } | ||
909 | |||
910 | /* | 902 | /* |
911 | * Attempt to get the fixed panel mode from DDC. Assume that the | 903 | * Attempt to get the fixed panel mode from DDC. Assume that the |
912 | * preferred mode is the right one. | 904 | * preferred mode is the right one. |
913 | */ | 905 | */ |
914 | intel_lvds->edid_good = true; | 906 | intel_lvds->edid_good = true; |
915 | if (!intel_ddc_get_modes(connector, intel_encoder->ddc_bus)) | 907 | if (!intel_ddc_get_modes(connector, &dev_priv->gmbus[GMBUS_PORT_PANEL].adapter)) |
916 | intel_lvds->edid_good = false; | 908 | intel_lvds->edid_good = false; |
917 | 909 | ||
918 | if (!intel_lvds->edid_good) { | 910 | if (!intel_lvds->edid_good) { |
@@ -999,8 +991,6 @@ out: | |||
999 | 991 | ||
1000 | failed: | 992 | failed: |
1001 | DRM_DEBUG_KMS("No LVDS modes found, disabling.\n"); | 993 | DRM_DEBUG_KMS("No LVDS modes found, disabling.\n"); |
1002 | if (intel_encoder->ddc_bus) | ||
1003 | intel_i2c_destroy(intel_encoder->ddc_bus); | ||
1004 | drm_connector_cleanup(connector); | 994 | drm_connector_cleanup(connector); |
1005 | drm_encoder_cleanup(encoder); | 995 | drm_encoder_cleanup(encoder); |
1006 | kfree(intel_lvds); | 996 | kfree(intel_lvds); |