The bind hooks will modify their controller registers, so simplefb is
going to be unusable anyway. Let's avoid any transient state where it
could still be in the system but no longer functionnal.

Acked-by: Nicolas Saenz Julienne <nsa...@kernel.org>
Signed-off-by: Maxime Ripard <max...@cerno.tech>
---
 drivers/gpu/drm/vc4/vc4_drv.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 12694e2201e7..c0d7e510694f 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -251,6 +251,10 @@ static int vc4_drm_bind(struct device *dev)
        if (ret)
                return ret;
 
+       ret = drm_aperture_remove_framebuffers(false, &vc4_drm_driver);
+       if (ret)
+               return ret;
+
        ret = component_bind_all(dev, drm);
        if (ret)
                return ret;
@@ -259,10 +263,6 @@ static int vc4_drm_bind(struct device *dev)
        if (ret)
                goto unbind_all;
 
-       ret = drm_aperture_remove_framebuffers(false, &vc4_drm_driver);
-       if (ret)
-               goto unbind_all;
-
        ret = vc4_kms_load(drm);
        if (ret < 0)
                goto unbind_all;
-- 
2.33.1

Reply via email to