From 20ea6adbf199097c4f5f591ffee088340630dae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Mon, 16 May 2022 23:40:32 +0200 Subject: bcm27xx: add support for linux v5.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones Signed-off-by: Álvaro Fernández Rojas --- ...ne-Register-a-different-drm_plane_helper_.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.15/950-0903-drm-vc4-plane-Register-a-different-drm_plane_helper_.patch (limited to 'target/linux/bcm27xx/patches-5.15/950-0903-drm-vc4-plane-Register-a-different-drm_plane_helper_.patch') diff --git a/target/linux/bcm27xx/patches-5.15/950-0903-drm-vc4-plane-Register-a-different-drm_plane_helper_.patch b/target/linux/bcm27xx/patches-5.15/950-0903-drm-vc4-plane-Register-a-different-drm_plane_helper_.patch new file mode 100644 index 0000000000..c861170b42 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0903-drm-vc4-plane-Register-a-different-drm_plane_helper_.patch @@ -0,0 +1,48 @@ +From 597258e5effb6ab56a116823e8cb88ccc578ec06 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Thu, 21 Apr 2022 11:39:27 +0200 +Subject: [PATCH] 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. + +Signed-off-by: Maxime Ripard +--- + drivers/gpu/drm/vc4/vc4_plane.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -1502,6 +1502,13 @@ static const struct drm_plane_helper_fun + .atomic_async_update = vc4_plane_atomic_async_update, + }; + ++static const struct drm_plane_helper_funcs vc5_plane_helper_funcs = { ++ .atomic_check = vc4_plane_atomic_check, ++ .atomic_update = vc4_plane_atomic_update, ++ .atomic_async_check = vc4_plane_atomic_async_check, ++ .atomic_async_update = vc4_plane_atomic_async_update, ++}; ++ + static bool vc4_format_mod_supported(struct drm_plane *plane, + uint32_t format, + uint64_t modifier) +@@ -1606,7 +1613,10 @@ struct drm_plane *vc4_plane_init(struct + if (ret) + return ERR_PTR(ret); + +- drm_plane_helper_add(plane, &vc4_plane_helper_funcs); ++ if (vc4->is_vc5) ++ drm_plane_helper_add(plane, &vc5_plane_helper_funcs); ++ else ++ drm_plane_helper_add(plane, &vc4_plane_helper_funcs); + + drm_plane_create_alpha_property(plane); + drm_plane_create_blend_mode_property(plane, -- cgit v1.2.3