diff options
| author | Luca Ceresoli <luca.ceresoli@bootlin.com> | 2026-04-23 11:16:55 +0200 |
|---|---|---|
| committer | Luca Ceresoli <luca.ceresoli@bootlin.com> | 2026-04-30 10:22:52 +0200 |
| commit | dcad6dd16e87a6dcc78ab05f64c704cec2809db9 (patch) | |
| tree | 8ac31ac9496fcef8544c9be9764f636f9b3d93be /drivers/gpu/drm/display/drm_bridge_connector.c | |
| parent | a5640267d6d35b89ebe6418da90a952a247215a5 (diff) | |
| download | linux-next-dcad6dd16e87a6dcc78ab05f64c704cec2809db9.tar.gz linux-next-dcad6dd16e87a6dcc78ab05f64c704cec2809db9.zip | |
drm/display: bridge-connector: attach the encoder to the created connector
Currently all users of the bridge-connector must call
drm_connector_attach_encoder() immediately after a successful
drm_bridge_connector_init().
This is an unnecessary burden for users. Move the call to the end of
drm_bridge_connector_init() so all callers can be simplified.
Update documentation accordingly, rewording a bit the whole paragraph which
would otherwise become poorly readable due to the growing list of actions.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260423-drm-bridge-connector-attach_encoder-v2-1-2ae6ca69b390@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'drivers/gpu/drm/display/drm_bridge_connector.c')
| -rw-r--r-- | drivers/gpu/drm/display/drm_bridge_connector.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c index 39cc18f78eda..d85ceb80c137 100644 --- a/drivers/gpu/drm/display/drm_bridge_connector.c +++ b/drivers/gpu/drm/display/drm_bridge_connector.c @@ -773,8 +773,11 @@ static void drm_bridge_connector_put_bridges(struct drm_device *dev, void *data) * @drm: the DRM device * @encoder: the encoder where the bridge chain starts * - * Allocate, initialise and register a &drm_bridge_connector with the @drm - * device. The connector is associated with a chain of bridges that starts at + * Create a new &drm_bridge_connector for the @drm device. The connector is + * allocated, initialised, registered with the @drm device and attached to + * @encoder. + * + * The connector is associated with a chain of bridges that starts at * the @encoder. All bridges in the chain shall report bridge operation flags * (&drm_bridge->ops) and bridge output type (&drm_bridge->type), and none of * them may create a DRM connector directly. @@ -1055,6 +1058,10 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm, IS_ENABLED(CONFIG_DRM_DISPLAY_HDCP_HELPER)) drm_connector_attach_content_protection_property(connector, true); + ret = drm_connector_attach_encoder(connector, encoder); + if (ret) + return ERR_PTR(ret); + return connector; } EXPORT_SYMBOL_GPL(drm_bridge_connector_init); |
