]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915/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:22 +0000 (01:03 +0200)
committerImre Deak <imre.deak@intel.com>
Tue, 17 Dec 2024 13:59:02 +0000 (15:59 +0200)
commit6fe7b1d10cbdf2c07808e76306c501482e563263
treeb1406102b2efdc2f8784b3174d2b34aa1ec15988
parent0f7c05b3c74d8cfce7d7418e22539dbc382de235
drm/i915/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:
- Rebase on the change which moves adding the connector to the
  connector list only later when calling
  drm_connector_dynamic_register().

v3:
- Rebase on drm-misc-next, due to a trivial conflict with
  commit 5503f8112e52 ("drm/i915/mst: unify MST topology callback naming ..."),
  which is only in drm-intel-next.
- Fix s/drm_connector_dynamic_register()/drm_connector_dynamic_init()
  typo in the commit log.

Cc: Lyude Paul <lyude@redhat.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (v1)
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241211230328.4012496-6-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp_mst.c