diff options
author | Chen-Yu Tsai <wens@csie.org> | 2017-10-17 08:18:01 -0400 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-10-17 13:49:17 -0400 |
commit | 9a8187c00373bce839388574910f72711c9c4c33 (patch) | |
tree | 45f4b1ab9d027e370b0732fabdcd4206648368d5 | |
parent | 7ea4291f9f1117d7f78b336629e8ff9d0c964919 (diff) |
drm/sun4i: Add support for A10 display pipeline components
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
-rw-r--r-- | Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_backend.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_drv.c | 4 |
3 files changed, 14 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt index 5650efcfd2ac..8f9a58181f89 100644 --- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt +++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | |||
@@ -155,6 +155,7 @@ system. | |||
155 | 155 | ||
156 | Required properties: | 156 | Required properties: |
157 | - compatible: value must be one of: | 157 | - compatible: value must be one of: |
158 | * allwinner,sun4i-a10-display-backend | ||
158 | * allwinner,sun5i-a13-display-backend | 159 | * allwinner,sun5i-a13-display-backend |
159 | * allwinner,sun6i-a31-display-backend | 160 | * allwinner,sun6i-a31-display-backend |
160 | * allwinner,sun8i-a33-display-backend | 161 | * allwinner,sun8i-a33-display-backend |
@@ -187,6 +188,7 @@ deinterlacing and color space conversion. | |||
187 | 188 | ||
188 | Required properties: | 189 | Required properties: |
189 | - compatible: value must be one of: | 190 | - compatible: value must be one of: |
191 | * allwinner,sun4i-a10-display-frontend | ||
190 | * allwinner,sun5i-a13-display-frontend | 192 | * allwinner,sun5i-a13-display-frontend |
191 | * allwinner,sun6i-a31-display-frontend | 193 | * allwinner,sun6i-a31-display-frontend |
192 | * allwinner,sun8i-a33-display-frontend | 194 | * allwinner,sun8i-a33-display-frontend |
@@ -233,6 +235,7 @@ extra node. | |||
233 | 235 | ||
234 | Required properties: | 236 | Required properties: |
235 | - compatible: value must be one of: | 237 | - compatible: value must be one of: |
238 | * allwinner,sun4i-a10-display-engine | ||
236 | * allwinner,sun5i-a10s-display-engine | 239 | * allwinner,sun5i-a10s-display-engine |
237 | * allwinner,sun5i-a13-display-engine | 240 | * allwinner,sun5i-a13-display-engine |
238 | * allwinner,sun6i-a31-display-engine | 241 | * allwinner,sun6i-a31-display-engine |
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c index e8477321f978..77f9e183df00 100644 --- a/drivers/gpu/drm/sun4i/sun4i_backend.c +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c | |||
@@ -514,6 +514,10 @@ static int sun4i_backend_remove(struct platform_device *pdev) | |||
514 | return 0; | 514 | return 0; |
515 | } | 515 | } |
516 | 516 | ||
517 | static const struct sun4i_backend_quirks sun4i_backend_quirks = { | ||
518 | .needs_output_muxing = true, | ||
519 | }; | ||
520 | |||
517 | static const struct sun4i_backend_quirks sun5i_backend_quirks = { | 521 | static const struct sun4i_backend_quirks sun5i_backend_quirks = { |
518 | }; | 522 | }; |
519 | 523 | ||
@@ -525,6 +529,10 @@ static const struct sun4i_backend_quirks sun8i_a33_backend_quirks = { | |||
525 | 529 | ||
526 | static const struct of_device_id sun4i_backend_of_table[] = { | 530 | static const struct of_device_id sun4i_backend_of_table[] = { |
527 | { | 531 | { |
532 | .compatible = "allwinner,sun4i-a10-display-backend", | ||
533 | .data = &sun4i_backend_quirks, | ||
534 | }, | ||
535 | { | ||
528 | .compatible = "allwinner,sun5i-a13-display-backend", | 536 | .compatible = "allwinner,sun5i-a13-display-backend", |
529 | .data = &sun5i_backend_quirks, | 537 | .data = &sun5i_backend_quirks, |
530 | }, | 538 | }, |
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index 12855ed53d13..51ad1fb6843c 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c | |||
@@ -178,7 +178,8 @@ static bool sun4i_drv_node_is_connector(struct device_node *node) | |||
178 | 178 | ||
179 | static bool sun4i_drv_node_is_frontend(struct device_node *node) | 179 | static bool sun4i_drv_node_is_frontend(struct device_node *node) |
180 | { | 180 | { |
181 | return of_device_is_compatible(node, "allwinner,sun5i-a13-display-frontend") || | 181 | return of_device_is_compatible(node, "allwinner,sun4i-a10-display-frontend") || |
182 | of_device_is_compatible(node, "allwinner,sun5i-a13-display-frontend") || | ||
182 | of_device_is_compatible(node, "allwinner,sun6i-a31-display-frontend") || | 183 | of_device_is_compatible(node, "allwinner,sun6i-a31-display-frontend") || |
183 | of_device_is_compatible(node, "allwinner,sun8i-a33-display-frontend"); | 184 | of_device_is_compatible(node, "allwinner,sun8i-a33-display-frontend"); |
184 | } | 185 | } |
@@ -343,6 +344,7 @@ static int sun4i_drv_remove(struct platform_device *pdev) | |||
343 | } | 344 | } |
344 | 345 | ||
345 | static const struct of_device_id sun4i_drv_of_table[] = { | 346 | static const struct of_device_id sun4i_drv_of_table[] = { |
347 | { .compatible = "allwinner,sun4i-a10-display-engine" }, | ||
346 | { .compatible = "allwinner,sun5i-a10s-display-engine" }, | 348 | { .compatible = "allwinner,sun5i-a10s-display-engine" }, |
347 | { .compatible = "allwinner,sun5i-a13-display-engine" }, | 349 | { .compatible = "allwinner,sun5i-a13-display-engine" }, |
348 | { .compatible = "allwinner,sun6i-a31-display-engine" }, | 350 | { .compatible = "allwinner,sun6i-a31-display-engine" }, |