[8/9] drm/radeon: Implement MST Aux device registration
diff mbox series

Message ID 20190723232808.28128-9-sunpeng.li@amd.com
State New
Headers show
Series
  • MST AUX Devices (v3)
Related show

Commit Message

Leo July 23, 2019, 11:28 p.m. UTC
From: Leo Li <sunpeng.li@amd.com>

Implement late_register and early_unregister hooks for MST connectors.
Call drm helpers for MST connector registration, which registers the
AUX devices.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/radeon/radeon_dp_mst.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Patch
diff mbox series

diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
index 2994f07fbad9..2d53699734fb 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
@@ -260,11 +260,33 @@  radeon_dp_mst_connector_destroy(struct drm_connector *connector)
 	kfree(radeon_connector);
 }
 
+static int
+radeon_dp_mst_connector_late_register(struct drm_connector *connector)
+{
+	struct radeon_connector *radeon_connector =
+		to_radeon_connector(connector);
+	struct drm_dp_mst_port *port = radeon_connector->port;
+
+	return drm_dp_mst_connector_late_register(connector, port);
+}
+
+static void
+radeon_dp_mst_connector_early_unregister(struct drm_connector *connector)
+{
+	struct radeon_connector *radeon_connector =
+		to_radeon_connector(connector);
+	struct drm_dp_mst_port *port = radeon_connector->port;
+
+	drm_dp_mst_connector_early_unregister(connector, port);
+}
+
 static const struct drm_connector_funcs radeon_dp_mst_connector_funcs = {
 	.dpms = drm_helper_connector_dpms,
 	.detect = radeon_dp_mst_detect,
 	.fill_modes = drm_helper_probe_single_connector_modes,
 	.destroy = radeon_dp_mst_connector_destroy,
+	.late_register = radeon_dp_mst_connector_late_register,
+	.early_unregister = radeon_dp_mst_connector_early_unregister,
 };
 
 static struct drm_connector *radeon_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,