summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2022-04-21 19:31:27 +0300
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2022-07-07 05:21:55 +0300
commit3e7f74dcfb7233ba3f8b3879066fdd3e79f2f701 (patch)
treedf39fb27fbad0f02d4800c884e6686473736cfd2 /drivers/gpu/drm/rcar-du/rcar_du_vsp.c
parent11d27fb95aa48db66a70fd8e34c1ff02c98f4041 (diff)
downloadlinux-3e7f74dcfb7233ba3f8b3879066fdd3e79f2f701.tar.xz
drm: rcar-du: Add num_rpf to struct rcar_du_device_info
Number of RPF's VSP is different on R-Car and RZ/G2L R-Car Gen3 -> 5 RPFs R-Car Gen2 -> 4 RPFs RZ/G2L -> 2 RPFs Add num_rpf to struct rcar_du_device_info to support later SoC without any code changes. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_vsp.c')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_vsp.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index c50de2c50b1b..f41a22d9c041 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -407,11 +407,7 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
if (ret < 0)
return ret;
- /*
- * The VSP2D (Gen3) has 5 RPFs, but the VSP1D (Gen2) is limited to
- * 4 RPFs.
- */
- num_planes = rcdu->info->gen >= 3 ? 5 : 4;
+ num_planes = rcdu->info->num_rpf;
vsp->planes = kcalloc(num_planes, sizeof(*vsp->planes), GFP_KERNEL);
if (!vsp->planes)