|
@@ -1177,7 +1177,6 @@ static void intel_aux_reg_init(struct intel_dp *intel_dp)
|
|
|
static void
|
|
|
intel_dp_aux_fini(struct intel_dp *intel_dp)
|
|
|
{
|
|
|
- drm_dp_aux_unregister(&intel_dp->aux);
|
|
|
kfree(intel_dp->aux.name);
|
|
|
}
|
|
|
|
|
@@ -1212,15 +1211,6 @@ intel_dp_aux_init(struct intel_dp *intel_dp, struct intel_connector *connector)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static void
|
|
|
-intel_dp_connector_unregister(struct intel_connector *intel_connector)
|
|
|
-{
|
|
|
- struct intel_dp *intel_dp = intel_attached_dp(&intel_connector->base);
|
|
|
-
|
|
|
- intel_dp_aux_fini(intel_dp);
|
|
|
- intel_connector_unregister(intel_connector);
|
|
|
-}
|
|
|
-
|
|
|
static int
|
|
|
intel_dp_sink_rates(struct intel_dp *intel_dp, const int **sink_rates)
|
|
|
{
|
|
@@ -4456,6 +4446,13 @@ done:
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static void
|
|
|
+intel_dp_connector_unregister(struct drm_connector *connector)
|
|
|
+{
|
|
|
+ drm_dp_aux_unregister(&intel_attached_dp(connector)->aux);
|
|
|
+ intel_connector_unregister(connector);
|
|
|
+}
|
|
|
+
|
|
|
static void
|
|
|
intel_dp_connector_destroy(struct drm_connector *connector)
|
|
|
{
|
|
@@ -4466,6 +4463,8 @@ intel_dp_connector_destroy(struct drm_connector *connector)
|
|
|
if (!IS_ERR_OR_NULL(intel_connector->edid))
|
|
|
kfree(intel_connector->edid);
|
|
|
|
|
|
+ intel_dp_aux_fini(intel_attached_dp(connector));
|
|
|
+
|
|
|
/* Can't call is_edp() since the encoder may have been destroyed
|
|
|
* already. */
|
|
|
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
|
|
@@ -4572,6 +4571,7 @@ static const struct drm_connector_funcs intel_dp_connector_funcs = {
|
|
|
.fill_modes = drm_helper_probe_single_connector_modes,
|
|
|
.set_property = intel_dp_set_property,
|
|
|
.atomic_get_property = intel_connector_atomic_get_property,
|
|
|
+ .early_unregister = intel_dp_connector_unregister,
|
|
|
.destroy = intel_dp_connector_destroy,
|
|
|
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
|
|
|
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
|
|
@@ -5487,7 +5487,6 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
|
|
|
intel_connector->get_hw_state = intel_ddi_connector_get_hw_state;
|
|
|
else
|
|
|
intel_connector->get_hw_state = intel_connector_get_hw_state;
|
|
|
- intel_connector->unregister = intel_dp_connector_unregister;
|
|
|
|
|
|
/* Set up the hotplug pin. */
|
|
|
switch (port) {
|