Commit 3ef2f119 authored by Boris Brezillon's avatar Boris Brezillon

drm/msm: Use drm_attach_bridge() to attach a bridge to an encoder

This is part of our attempt to make the bridge chain a double-linked
list based on the generic list helpers. In order to do that, we must
patch all drivers manipulating the encoder->bridge field directly.
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20190826152649.13820-9-boris.brezillon@collabora.com
parent ee68c743
...@@ -178,7 +178,9 @@ int msm_edp_modeset_init(struct msm_edp *edp, struct drm_device *dev, ...@@ -178,7 +178,9 @@ int msm_edp_modeset_init(struct msm_edp *edp, struct drm_device *dev,
goto fail; goto fail;
} }
encoder->bridge = edp->bridge; ret = drm_bridge_attach(encoder, edp->bridge, NULL);
if (ret)
goto fail;
priv->bridges[priv->num_bridges++] = edp->bridge; priv->bridges[priv->num_bridges++] = edp->bridge;
priv->connectors[priv->num_connectors++] = edp->connector; priv->connectors[priv->num_connectors++] = edp->connector;
......
...@@ -327,7 +327,9 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, ...@@ -327,7 +327,9 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi,
goto fail; goto fail;
} }
encoder->bridge = hdmi->bridge; ret = drm_bridge_attach(encoder, hdmi->bridge, NULL);
if (ret)
goto fail;
priv->bridges[priv->num_bridges++] = hdmi->bridge; priv->bridges[priv->num_bridges++] = hdmi->bridge;
priv->connectors[priv->num_connectors++] = hdmi->connector; priv->connectors[priv->num_connectors++] = hdmi->connector;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment