[PATCH 8/9] drm/radeon: Implement MST Aux device registration

sunpeng.li at amd.com sunpeng.li at amd.com
Tue Jul 23 23:28:07 UTC 2019


From: Leo Li <sunpeng.li at 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 at amd.com>
Cc: Harry Wentland <harry.wentland at amd.com>
Signed-off-by: Leo Li <sunpeng.li at amd.com>
---
 drivers/gpu/drm/radeon/radeon_dp_mst.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

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,
-- 
2.22.0



More information about the amd-gfx mailing list