Skip to content

Commit 2095848

Browse files
committed
drm/vc4: plane: Register a different drm_plane_helper_funcs on BCM2711
On the BCM2711, our current definition of drm_plane_helper_funcs uses the custom vc4_prepare_fb() and vc4_cleanup_fb(). Those functions rely on the buffer allocation path that was relying on the GPU, and is no longer relevant. Let's create another drm_plane_helper_funcs structure that we will register on the BCM2711. Reviewed-by: Melissa Wen <mwen@igalia.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20220610115149.964394-8-maxime@cerno.tech
1 parent 39a30ec commit 2095848

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

drivers/gpu/drm/vc4/vc4_plane.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,13 @@ static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = {
13891389
.atomic_async_update = vc4_plane_atomic_async_update,
13901390
};
13911391

1392+
static const struct drm_plane_helper_funcs vc5_plane_helper_funcs = {
1393+
.atomic_check = vc4_plane_atomic_check,
1394+
.atomic_update = vc4_plane_atomic_update,
1395+
.atomic_async_check = vc4_plane_atomic_async_check,
1396+
.atomic_async_update = vc4_plane_atomic_async_update,
1397+
};
1398+
13921399
static bool vc4_format_mod_supported(struct drm_plane *plane,
13931400
uint32_t format,
13941401
uint64_t modifier)
@@ -1493,7 +1500,10 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev,
14931500
if (ret)
14941501
return ERR_PTR(ret);
14951502

1496-
drm_plane_helper_add(plane, &vc4_plane_helper_funcs);
1503+
if (vc4->is_vc5)
1504+
drm_plane_helper_add(plane, &vc5_plane_helper_funcs);
1505+
else
1506+
drm_plane_helper_add(plane, &vc4_plane_helper_funcs);
14971507

14981508
drm_plane_create_alpha_property(plane);
14991509
drm_plane_create_rotation_property(plane, DRM_MODE_ROTATE_0,

0 commit comments

Comments
 (0)