Skip to content

Commit 5a83c92

Browse files
committed
drm/nouveau/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: Karol Herbst <[email protected]> Cc: Lyude Paul <[email protected]> Cc: Danilo Krummrich <[email protected]> Reviewed-by: 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 550949c commit 5a83c92

File tree

1 file changed

+2
-2
lines changed
  • drivers/gpu/drm/nouveau/dispnv50

1 file changed

+2
-2
lines changed

drivers/gpu/drm/nouveau/dispnv50/disp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,8 +1265,8 @@ nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port,
12651265
mstc->mstm = mstm;
12661266
mstc->port = port;
12671267

1268-
ret = drm_connector_init(dev, &mstc->connector, &nv50_mstc,
1269-
DRM_MODE_CONNECTOR_DisplayPort);
1268+
ret = drm_connector_dynamic_init(dev, &mstc->connector, &nv50_mstc,
1269+
DRM_MODE_CONNECTOR_DisplayPort, NULL);
12701270
if (ret) {
12711271
kfree(*pmstc);
12721272
*pmstc = NULL;

0 commit comments

Comments
 (0)