summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-24 08:29:45 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-24 08:29:45 +0200
commit10bb667223f3d4e9c4eb53595f9d7f67a1018952 (patch)
treeeabb532439ac57e05d07d36f7432208e0782fde4 /drivers/gpu/drm/i915/intel_dp.c
parent64989ca4b27acb026b6496ec21e43bee66f86a5b (diff)
parent2a3467063ae3b17264578626dec2377dd48cd1c3 (diff)
downloadlinux-10bb667223f3d4e9c4eb53595f9d7f67a1018952.tar.gz
linux-10bb667223f3d4e9c4eb53595f9d7f67a1018952.tar.bz2
linux-10bb667223f3d4e9c4eb53595f9d7f67a1018952.zip
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued
Backmerge drm-next for the reworked device register/unregistering. Chris Wilson needs that to be able to land his i915 load/unload demidlayering. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 8bb20e7048ec..85f2801b16ed 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1246,7 +1246,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);
}
@@ -1281,15 +1280,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)
{
@@ -4531,6 +4521,13 @@ done:
}
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)
{
struct intel_connector *intel_connector = to_intel_connector(connector);
@@ -4570,6 +4567,9 @@ void intel_dp_encoder_destroy(struct drm_encoder *encoder)
intel_dp->edp_notifier.notifier_call = NULL;
}
}
+
+ intel_dp_aux_fini(intel_dp);
+
drm_encoder_cleanup(encoder);
kfree(intel_dig_port);
}
@@ -4648,6 +4648,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,
@@ -5583,7 +5584,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) {