[PATCH 2/2] drm:fsl-dcu: add support for drm bridge
Stefan Agner
stefan at agner.ch
Sat Jun 25 22:08:52 UTC 2016
On 2016-06-24 02:00, Meng Yi wrote:
> The current output code only supports connection to drm panels.
> Add codes to support drm bridge, to supports connection to
I sense to many s here.
Code in the C program code sense is typically an uncountable noun, hence
drop the s.
And "to support connections"
> external connectors.
>
> Signed-off-by: Meng Yi <meng.yi at nxp.com>
> ---
> drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
> b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
> index 57a030b..f19e9b1 100644
> --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
> +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
> @@ -189,6 +189,7 @@ err_cleanup:
> static int fsl_dcu_attach_endpoint(struct fsl_dcu_drm_device *fsl_dev,
> const struct of_endpoint *ep)
> {
> + struct drm_bridge *bridge;
> struct device_node *np;
> int ret;
>
> @@ -200,8 +201,21 @@ static int fsl_dcu_attach_endpoint(struct
> fsl_dcu_drm_device *fsl_dev,
> ret = fsl_dcu_attach_panel(fsl_dev, fsl_dev->connector.panel);
> if (ret)
> return -EPROBE_DEFER;
> + return 0;
> }
>
> + bridge = of_drm_find_bridge(np);
> + of_node_put(np);
> + if (!bridge)
> + return -ENODEV;
> +
> + fsl_dev->encoder.bridge = bridge;
> + bridge->encoder = &fsl_dev->encoder;
> +
> + ret = drm_bridge_attach(fsl_dev->drm, bridge);
> + if (ret)
> + return -EPROBE_DEFER;
Just return whatever drm_bridge_attach is returning.
--
Stefan
> +
> return 0;
> }
More information about the dri-devel
mailing list