]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/sun4i: Add support for A10 display pipeline components
authorChen-Yu Tsai <wens@csie.org>
Tue, 17 Oct 2017 12:18:01 +0000 (20:18 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 17 Oct 2017 17:49:17 +0000 (19:49 +0200)
The A10 display pipeline has 2 frontends, 2 backends, and 2 TCONs.
This patch adds support (or a compatible string in the frontend's
case) for these components.

The TCONs support directly outputting to CPU/RGB/LVDS LCD panels,
or it can output to HDMI via an on-chip HDMI controller, or
CVBS/YPbPr/VGA signals via on-chip TV encoders. These additional
encoders are not covered in this patch.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171017121807.2994-5-wens@csie.org
Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
drivers/gpu/drm/sun4i/sun4i_backend.c
drivers/gpu/drm/sun4i/sun4i_drv.c

index 5650efcfd2ace7cd6728dc932fdd3ddb89375fd1..8f9a58181f89b28545a9f9b15ee2f5d8526af510 100644 (file)
@@ -155,6 +155,7 @@ system.
 
 Required properties:
   - compatible: value must be one of:
+    * allwinner,sun4i-a10-display-backend
     * allwinner,sun5i-a13-display-backend
     * allwinner,sun6i-a31-display-backend
     * allwinner,sun8i-a33-display-backend
@@ -187,6 +188,7 @@ deinterlacing and color space conversion.
 
 Required properties:
   - compatible: value must be one of:
+    * allwinner,sun4i-a10-display-frontend
     * allwinner,sun5i-a13-display-frontend
     * allwinner,sun6i-a31-display-frontend
     * allwinner,sun8i-a33-display-frontend
@@ -233,6 +235,7 @@ extra node.
 
 Required properties:
   - compatible: value must be one of:
+    * allwinner,sun4i-a10-display-engine
     * allwinner,sun5i-a10s-display-engine
     * allwinner,sun5i-a13-display-engine
     * allwinner,sun6i-a31-display-engine
index e8477321f978859b6fe46e285c66dfbf70dca62b..77f9e183df00d892f28b813310c3b4cba46cdac0 100644 (file)
@@ -514,6 +514,10 @@ static int sun4i_backend_remove(struct platform_device *pdev)
        return 0;
 }
 
+static const struct sun4i_backend_quirks sun4i_backend_quirks = {
+       .needs_output_muxing = true,
+};
+
 static const struct sun4i_backend_quirks sun5i_backend_quirks = {
 };
 
@@ -524,6 +528,10 @@ static const struct sun4i_backend_quirks sun8i_a33_backend_quirks = {
 };
 
 static const struct of_device_id sun4i_backend_of_table[] = {
+       {
+               .compatible = "allwinner,sun4i-a10-display-backend",
+               .data = &sun4i_backend_quirks,
+       },
        {
                .compatible = "allwinner,sun5i-a13-display-backend",
                .data = &sun5i_backend_quirks,
index 12855ed53d1387c9d8c380fc6b5ae926f6e3f5b6..51ad1fb6843c60c902f6d1e572d8b9e308907451 100644 (file)
@@ -178,7 +178,8 @@ static bool sun4i_drv_node_is_connector(struct device_node *node)
 
 static bool sun4i_drv_node_is_frontend(struct device_node *node)
 {
-       return of_device_is_compatible(node, "allwinner,sun5i-a13-display-frontend") ||
+       return of_device_is_compatible(node, "allwinner,sun4i-a10-display-frontend") ||
+               of_device_is_compatible(node, "allwinner,sun5i-a13-display-frontend") ||
                of_device_is_compatible(node, "allwinner,sun6i-a31-display-frontend") ||
                of_device_is_compatible(node, "allwinner,sun8i-a33-display-frontend");
 }
@@ -343,6 +344,7 @@ static int sun4i_drv_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id sun4i_drv_of_table[] = {
+       { .compatible = "allwinner,sun4i-a10-display-engine" },
        { .compatible = "allwinner,sun5i-a10s-display-engine" },
        { .compatible = "allwinner,sun5i-a13-display-engine" },
        { .compatible = "allwinner,sun6i-a31-display-engine" },