summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sun4i/sun4i_drv.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2015-10-29 08:37:32 (GMT)
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-04-28 08:30:05 (GMT)
commit29e57fab97fcdac9bf04db5f8f59ee63ab11b866 (patch)
treedf1e390b767f303376ef30aab4a4ae568962319e /drivers/gpu/drm/sun4i/sun4i_drv.c
parent9026e0d122ac87d329b76a9b631622b03941af64 (diff)
downloadlinux-29e57fab97fcdac9bf04db5f8f59ee63ab11b866.tar.xz
drm: sun4i: Add RGB output
One of the A10 display pipeline possible output is an RGB interface to drive LCD panels directly. This is done through the first channel of the TCON that will output our video signals directly. Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_drv.c')
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_drv.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 8a03e12..76e922b 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -222,6 +222,11 @@ static bool sun4i_drv_node_is_frontend(struct device_node *node)
"allwinner,sun5i-a13-display-frontend");
}
+static bool sun4i_drv_node_is_tcon(struct device_node *node)
+{
+ return of_device_is_compatible(node, "allwinner,sun5i-a13-tcon");
+}
+
static int compare_of(struct device *dev, void *data)
{
DRM_DEBUG_DRIVER("Comparing of node %s with %s\n",
@@ -270,6 +275,25 @@ static int sun4i_drv_add_endpoints(struct device *dev,
continue;
}
+ /*
+ * If the node is our TCON, the first port is used for our
+ * panel, and will not be part of the
+ * component framework.
+ */
+ if (sun4i_drv_node_is_tcon(node)) {
+ struct of_endpoint endpoint;
+
+ if (of_graph_parse_endpoint(ep, &endpoint)) {
+ DRM_DEBUG_DRIVER("Couldn't parse endpoint\n");
+ continue;
+ }
+
+ if (!endpoint.id) {
+ DRM_DEBUG_DRIVER("Endpoint is our panel... skipping\n");
+ continue;
+ }
+ }
+
/* Walk down our tree */
count += sun4i_drv_add_endpoints(dev, match, remote);