]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/rcar-du: Add support for r8a779h0
authorTomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Tue, 17 Dec 2024 05:31:41 +0000 (07:31 +0200)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Tue, 17 Dec 2024 13:13:04 +0000 (15:13 +0200)
Add support for r8a779h0. It is very similar to r8a779g0, but has only
one output.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241217-rcar-gh-dsi-v5-7-e77421093c05@ideasonboard.com
drivers/gpu/drm/renesas/rcar-du/rcar_du_drv.c
drivers/gpu/drm/renesas/rcar-du/rcar_du_group.c

index d988433c8d3e74a3f51c579a4b74bb048f0bb8e9..d948ff3594c49961bebc60bd834b4a76e7890280 100644 (file)
@@ -546,6 +546,23 @@ static const struct rcar_du_device_info rcar_du_r8a779g0_info = {
        .dsi_clk_mask =  BIT(1) | BIT(0),
 };
 
+static const struct rcar_du_device_info rcar_du_r8a779h0_info = {
+       .gen = 4,
+       .features = RCAR_DU_FEATURE_CRTC_IRQ
+                 | RCAR_DU_FEATURE_VSP1_SOURCE
+                 | RCAR_DU_FEATURE_NO_BLENDING,
+       .channels_mask = BIT(0),
+       .routes = {
+               /* R8A779H0 has one MIPI DSI output. */
+               [RCAR_DU_OUTPUT_DSI0] = {
+                       .possible_crtcs = BIT(0),
+                       .port = 0,
+               },
+       },
+       .num_rpf = 5,
+       .dsi_clk_mask = BIT(0),
+};
+
 static const struct of_device_id rcar_du_of_table[] = {
        { .compatible = "renesas,du-r8a7742", .data = &rcar_du_r8a7790_info },
        { .compatible = "renesas,du-r8a7743", .data = &rzg1_du_r8a7743_info },
@@ -572,6 +589,7 @@ static const struct of_device_id rcar_du_of_table[] = {
        { .compatible = "renesas,du-r8a77995", .data = &rcar_du_r8a7799x_info },
        { .compatible = "renesas,du-r8a779a0", .data = &rcar_du_r8a779a0_info },
        { .compatible = "renesas,du-r8a779g0", .data = &rcar_du_r8a779g0_info },
+       { .compatible = "renesas,du-r8a779h0", .data = &rcar_du_r8a779h0_info },
        { }
 };
 
index 1ec806c8e0139b94cfe39e5f45d9fdd1a40319ab..068c106e586cc695aab9de819b333e42783d8643 100644 (file)
@@ -107,10 +107,12 @@ static void rcar_du_group_setup_didsr(struct rcar_du_group *rgrp)
                 */
                rcrtc = rcdu->crtcs;
                num_crtcs = rcdu->num_crtcs;
-       } else if (rcdu->info->gen >= 3 && rgrp->num_crtcs > 1) {
+       } else if ((rcdu->info->gen == 3 && rgrp->num_crtcs > 1) ||
+                  rcdu->info->gen == 4) {
                /*
                 * On Gen3 dot clocks are setup through per-group registers,
                 * only available when the group has two channels.
+                * On Gen4 the registers are there for single channel too.
                 */
                rcrtc = &rcdu->crtcs[rgrp->index * 2];
                num_crtcs = rgrp->num_crtcs;