e78c5aa80df02847f5137c1edf4d5c558563fdb0
[openwrt/staging/neocturne.git] /
1 From c8f54918eece907f904d160815603bfcee0cfa1e Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Wed, 15 Dec 2021 10:51:16 +0100
4 Subject: [PATCH] drm/vc4: Remove conflicting framebuffers before
5 callind bind_all
6
7 The bind hooks will modify their controller registers, so simplefb is
8 going to be unusable anyway. Let's avoid any transient state where it
9 could still be in the system but no longer functionnal.
10
11 Acked-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
12 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
13 Link: https://patchwork.freedesktop.org/patch/msgid/20211215095117.176435-4-maxime@cerno.tech
14 ---
15 drivers/gpu/drm/vc4/vc4_drv.c | 8 ++++----
16 1 file changed, 4 insertions(+), 4 deletions(-)
17
18 --- a/drivers/gpu/drm/vc4/vc4_drv.c
19 +++ b/drivers/gpu/drm/vc4/vc4_drv.c
20 @@ -272,15 +272,15 @@ static int vc4_drm_bind(struct device *d
21 if (ret)
22 return ret;
23
24 - ret = component_bind_all(dev, drm);
25 + ret = drm_aperture_remove_framebuffers(false, &vc4_drm_driver);
26 if (ret)
27 return ret;
28
29 - ret = vc4_plane_create_additional_planes(drm);
30 + ret = component_bind_all(dev, drm);
31 if (ret)
32 - goto unbind_all;
33 + return ret;
34
35 - ret = drm_aperture_remove_framebuffers(false, &vc4_drm_driver);
36 + ret = vc4_plane_create_additional_planes(drm);
37 if (ret)
38 goto unbind_all;
39