1 From 597258e5effb6ab56a116823e8cb88ccc578ec06 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 21 Apr 2022 11:39:27 +0200
4 Subject: [PATCH] drm/vc4: plane: Register a different
5 drm_plane_helper_funcs on BCM2711
7 On the BCM2711, our current definition of drm_plane_helper_funcs uses
8 the custom vc4_prepare_fb() and vc4_cleanup_fb().
10 Those functions rely on the buffer allocation path that was relying on
11 the GPU, and is no longer relevant.
13 Let's create another drm_plane_helper_funcs structure that we will
14 register on the BCM2711.
16 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
18 drivers/gpu/drm/vc4/vc4_plane.c | 12 +++++++++++-
19 1 file changed, 11 insertions(+), 1 deletion(-)
21 --- a/drivers/gpu/drm/vc4/vc4_plane.c
22 +++ b/drivers/gpu/drm/vc4/vc4_plane.c
23 @@ -1504,6 +1504,13 @@ static const struct drm_plane_helper_fun
24 .atomic_async_update = vc4_plane_atomic_async_update,
27 +static const struct drm_plane_helper_funcs vc5_plane_helper_funcs = {
28 + .atomic_check = vc4_plane_atomic_check,
29 + .atomic_update = vc4_plane_atomic_update,
30 + .atomic_async_check = vc4_plane_atomic_async_check,
31 + .atomic_async_update = vc4_plane_atomic_async_update,
34 static bool vc4_format_mod_supported(struct drm_plane *plane,
37 @@ -1608,7 +1615,10 @@ struct drm_plane *vc4_plane_init(struct
41 - drm_plane_helper_add(plane, &vc4_plane_helper_funcs);
43 + drm_plane_helper_add(plane, &vc5_plane_helper_funcs);
45 + drm_plane_helper_add(plane, &vc4_plane_helper_funcs);
47 drm_plane_create_alpha_property(plane);
48 drm_plane_create_blend_mode_property(plane,