openwrt/target/linux/bcm27xx/patches-5.15/950-0023-drm-vc4-Remove-conflicting-framebuffers-before-calli.patch
Álvaro Fernández Rojas 20ea6adbf1 bcm27xx: add support for linux v5.15
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 <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2022-05-17 15:11:22 +02:00

40 lines
1.3 KiB
Diff

From c8f54918eece907f904d160815603bfcee0cfa1e Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime@cerno.tech>
Date: Wed, 15 Dec 2021 10:51:16 +0100
Subject: [PATCH] drm/vc4: Remove conflicting framebuffers before
callind bind_all
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 <nsaenz@kernel.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20211215095117.176435-4-maxime@cerno.tech
---
drivers/gpu/drm/vc4/vc4_drv.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -253,15 +253,15 @@ static int vc4_drm_bind(struct device *d
if (ret)
return ret;
- ret = component_bind_all(dev, drm);
+ ret = drm_aperture_remove_framebuffers(false, &vc4_drm_driver);
if (ret)
return ret;
- ret = vc4_plane_create_additional_planes(drm);
+ ret = component_bind_all(dev, drm);
if (ret)
- goto unbind_all;
+ return ret;
- ret = drm_aperture_remove_framebuffers(false, &vc4_drm_driver);
+ ret = vc4_plane_create_additional_planes(drm);
if (ret)
goto unbind_all;