Skip to content

Commit 550949c

Browse files
committed
drm/amd/dp_mst: Expose a connector to kernel users after it's properly initialized
After a connector is added to the drm_mode_config::connector_list, it's visible to any in-kernel users looking up connectors via the above list. Make sure that the connector is properly initialized before such look-ups, by initializing the connector with drm_connector_dynamic_init() - which doesn't add the connector to the list - and registering it with drm_connector_dynamic_register() - which adds the connector to the list - after the initialization is complete. v2: Fix s/drm_connector_dynamic_register()/drm_connector_dynamic_init() typo in the commit log. Cc: Harry Wentland <[email protected]> Cc: Leo Li <[email protected]> Cc: Wayne Lin <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Lyude Paul <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Acked-by: Alex Deucher <[email protected]> Acked-by: Wayne Lin <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6fe7b1d commit 550949c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,11 +590,12 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
590590
amdgpu_dm_set_mst_status(&aconnector->mst_status,
591591
MST_PROBE, true);
592592

593-
if (drm_connector_init(
593+
if (drm_connector_dynamic_init(
594594
dev,
595595
connector,
596596
&dm_dp_mst_connector_funcs,
597-
DRM_MODE_CONNECTOR_DisplayPort)) {
597+
DRM_MODE_CONNECTOR_DisplayPort,
598+
NULL)) {
598599
kfree(aconnector);
599600
return NULL;
600601
}

0 commit comments

Comments
 (0)