drm/amd/dp_mst: Expose a connector to kernel users after it's properly initialized
authorImre Deak <imre.deak@intel.com>
Wed, 11 Dec 2024 23:03:23 +0000 (01:03 +0200)
committerImre Deak <imre.deak@intel.com>
Tue, 17 Dec 2024 14:03:46 +0000 (16:03 +0200)
commit550949c67cedfee22334dcb47ec6447f39a96af0
treec722fa4595f2aff0b5db6f9f4ed3484dbd59697a
parent6fe7b1d10cbdf2c07808e76306c501482e563263
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 <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Wayne Lin <wayne.lin@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-7-imre.deak@intel.com
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c