diff options
author | Meng Yi <meng.yi@nxp.com> | 2016-07-15 14:53:38 +0800 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2016-07-15 18:06:28 -0700 |
commit | c4a304d3b1dc9d1732b5d78cc190b5c3e41870d4 (patch) | |
tree | 33127baec97309d2a118a5d082541d9691e9eedd /drivers/gpu | |
parent | 924591b1f289e48ac1b893607906a16c98cae053 (diff) | |
download | talos-obmc-linux-c4a304d3b1dc9d1732b5d78cc190b5c3e41870d4.tar.gz talos-obmc-linux-c4a304d3b1dc9d1732b5d78cc190b5c3e41870d4.zip |
drm/fsl-dcu: add support for drm bridge
The current output code only supports connection to drm panels.
Add code to support drm bridge, to support connections to
external connectors.
Signed-off-by: Meng Yi <meng.yi@nxp.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 16 |
1 files changed, 13 insertions, 3 deletions
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 32eff990d199..26edcc899712 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c @@ -180,16 +180,26 @@ 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; np = of_graph_get_remote_port_parent(ep->local_node); fsl_dev->connector.panel = of_drm_find_panel(np); - of_node_put(np); - if (fsl_dev->connector.panel) + if (fsl_dev->connector.panel) { + of_node_put(np); return fsl_dcu_attach_panel(fsl_dev, fsl_dev->connector.panel); + } + + bridge = of_drm_find_bridge(np); + of_node_put(np); + if (!bridge) + return -ENODEV; + + fsl_dev->encoder.bridge = bridge; + bridge->encoder = &fsl_dev->encoder; - return -ENODEV; + return drm_bridge_attach(fsl_dev->drm, bridge); } int fsl_dcu_create_outputs(struct fsl_dcu_drm_device *fsl_dev) |