]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/sun4i: Add driver support for A80 display pipeline
authorChen-Yu Tsai <wens@csie.org>
Thu, 15 Mar 2018 11:41:33 +0000 (19:41 +0800)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 19 Mar 2018 14:40:24 +0000 (15:40 +0100)
This patch adds support for the compatible strings of the A80 display
pipeline.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180315114136.24747-6-wens@csie.org
drivers/gpu/drm/sun4i/sun4i_backend.c
drivers/gpu/drm/sun4i/sun4i_drv.c
drivers/gpu/drm/sun4i/sun6i_drc.c

index 092ade4ff6a56ca20be41e99fce44e274f6088c2..ed36240048d5436dfcd1450919b710f5d01c7ecd 100644 (file)
@@ -793,6 +793,9 @@ static const struct sun4i_backend_quirks sun7i_backend_quirks = {
 static const struct sun4i_backend_quirks sun8i_a33_backend_quirks = {
 };
 
+static const struct sun4i_backend_quirks sun9i_backend_quirks = {
+};
+
 static const struct of_device_id sun4i_backend_of_table[] = {
        {
                .compatible = "allwinner,sun4i-a10-display-backend",
@@ -814,6 +817,10 @@ static const struct of_device_id sun4i_backend_of_table[] = {
                .compatible = "allwinner,sun8i-a33-display-backend",
                .data = &sun8i_a33_backend_quirks,
        },
+       {
+               .compatible = "allwinner,sun9i-a80-display-backend",
+               .data = &sun9i_backend_quirks,
+       },
        { }
 };
 MODULE_DEVICE_TABLE(of, sun4i_backend_of_table);
index a0f43b81c64cd5586db8b6f2c029f74de49fe8cc..7f0705ef9f4eff9b6d902135be17ac1218efc280 100644 (file)
@@ -176,7 +176,13 @@ static bool sun4i_drv_node_is_frontend(struct device_node *node)
                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,sun7i-a20-display-frontend") ||
-               of_device_is_compatible(node, "allwinner,sun8i-a33-display-frontend");
+               of_device_is_compatible(node, "allwinner,sun8i-a33-display-frontend") ||
+               of_device_is_compatible(node, "allwinner,sun9i-a80-display-frontend");
+}
+
+static bool sun4i_drv_node_is_deu(struct device_node *node)
+{
+       return of_device_is_compatible(node, "allwinner,sun9i-a80-deu");
 }
 
 static bool sun4i_drv_node_is_supported_frontend(struct device_node *node)
@@ -257,7 +263,8 @@ static int sun4i_drv_add_endpoints(struct device *dev,
         * enabled frontend supported by the driver, we add it to our
         * component list.
         */
-       if (!sun4i_drv_node_is_frontend(node) ||
+       if (!(sun4i_drv_node_is_frontend(node) ||
+             sun4i_drv_node_is_deu(node)) ||
            (sun4i_drv_node_is_supported_frontend(node) &&
             of_device_is_available(node))) {
                /* Add current component */
@@ -361,6 +368,7 @@ static const struct of_device_id sun4i_drv_of_table[] = {
        { .compatible = "allwinner,sun8i-a83t-display-engine" },
        { .compatible = "allwinner,sun8i-h3-display-engine" },
        { .compatible = "allwinner,sun8i-v3s-display-engine" },
+       { .compatible = "allwinner,sun9i-a80-display-engine" },
        { }
 };
 MODULE_DEVICE_TABLE(of, sun4i_drv_of_table);
index 09bba853e2a4237cf876e8295a8a7a8314c247ef..b5e071a4904523386ceea0c8205dc3dad3ba6767 100644 (file)
@@ -101,6 +101,7 @@ static const struct of_device_id sun6i_drc_of_table[] = {
        { .compatible = "allwinner,sun6i-a31-drc" },
        { .compatible = "allwinner,sun6i-a31s-drc" },
        { .compatible = "allwinner,sun8i-a33-drc" },
+       { .compatible = "allwinner,sun9i-a80-drc" },
        { }
 };
 MODULE_DEVICE_TABLE(of, sun6i_drc_of_table);