931e2bdad4d775a27543d91f1eb6c269bffc61d7
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0545-drm-vc4-plane-Create-more-planes.patch
1 From b79a33509a3aa863cdf54d24e1a4a0cc2c6fe84c Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 6 Feb 2020 14:52:42 +0100
4 Subject: [PATCH] drm/vc4: plane: Create more planes
5
6 Let's now create more planes that can be affected to all the CRTCs.
7
8 vc4 has 3 CRTCs, 1 primary and 1 cursor each, and was having 24 (8
9 planes per CRTC) overlays.
10
11 However, vc5 has 5 CRTCs, so keeping the same logic would put us at 50
12 planes which is well above the 32 planes limit imposed by DRM.
13
14 Using 16 seems like a good tradeoff between staying under 32 and yet
15 providing enough planes.
16
17 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
18 ---
19 drivers/gpu/drm/vc4/vc4_plane.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 --- a/drivers/gpu/drm/vc4/vc4_plane.c
23 +++ b/drivers/gpu/drm/vc4/vc4_plane.c
24 @@ -1463,7 +1463,7 @@ int vc4_plane_create_additional_planes(s
25 * modest number of planes to expose, that should hopefully
26 * still cover any sane usecase.
27 */
28 - for (i = 0; i < 8; i++) {
29 + for (i = 0; i < 16; i++) {
30 struct drm_plane *plane =
31 vc4_plane_init(drm, DRM_PLANE_TYPE_OVERLAY);
32