aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 5ba0a612d463..ed1d34680125 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2986,7 +2986,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
2986 } else { 2986 } else {
2987 /* if this fails, presume the device is a ghost */ 2987 /* if this fails, presume the device is a ghost */
2988 DRM_INFO("failed to retrieve link info, disabling eDP\n"); 2988 DRM_INFO("failed to retrieve link info, disabling eDP\n");
2989 intel_dp_encoder_destroy(&intel_dig_port->base.base);
2990 return false; 2989 return false;
2991 } 2990 }
2992 2991
@@ -3146,6 +3145,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
3146 intel_dp_i2c_init(intel_dp, intel_connector, name); 3145 intel_dp_i2c_init(intel_dp, intel_connector, name);
3147 3146
3148 if (!intel_edp_init_connector(intel_dp, intel_connector)) { 3147 if (!intel_edp_init_connector(intel_dp, intel_connector)) {
3148 i2c_del_adapter(&intel_dp->adapter);
3149 if (is_edp(intel_dp)) {
3150 cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
3151 mutex_lock(&dev->mode_config.mutex);
3152 ironlake_panel_vdd_off_sync(intel_dp);
3153 mutex_unlock(&dev->mode_config.mutex);
3154 }
3149 drm_sysfs_connector_remove(connector); 3155 drm_sysfs_connector_remove(connector);
3150 drm_connector_cleanup(connector); 3156 drm_connector_cleanup(connector);
3151 return false; 3157 return false;
@@ -3208,6 +3214,9 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port)
3208 intel_encoder->cloneable = false; 3214 intel_encoder->cloneable = false;
3209 intel_encoder->hot_plug = intel_dp_hot_plug; 3215 intel_encoder->hot_plug = intel_dp_hot_plug;
3210 3216
3211 if (!intel_dp_init_connector(intel_dig_port, intel_connector)) 3217 if (!intel_dp_init_connector(intel_dig_port, intel_connector)) {
3218 drm_encoder_cleanup(encoder);
3219 kfree(intel_dig_port);
3212 kfree(intel_connector); 3220 kfree(intel_connector);
3221 }
3213} 3222}