The simple-framebuffer uses the framebuffer region initialized by the
boot loader for display. However, with Linux the DSI and FIMD/DECON
stack is initialized from scratch.

However, both are destined use the same memory region, so both cannot
co-exist. For a seamless display transition during boot, the framebuffer
must be destroyed, which releases the memory region, followed by proper
IP re-initialization. Achieve it using
aperture_remove_all_conflicting_devices(). This is also implemented in
other similar systems such as in Qualcomm's msm_kms driver.

Signed-off-by: Kaustabh Chakraborty <[email protected]>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c 
b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 9ee30086879f..e05e520449ed 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -7,6 +7,7 @@
  *     Seung-Woo Kim <[email protected]>
  */
 
+#include <linux/aperture.h>
 #include <linux/component.h>
 #include <linux/dma-mapping.h>
 #include <linux/platform_device.h>
@@ -268,6 +269,11 @@ static int exynos_drm_bind(struct device *dev)
        list_for_each_entry(encoder, &drm->mode_config.encoder_list, head)
                encoder->possible_clones = clone_mask;
 
+       /* Remove existing devices which own the framebuffer memory. */
+       ret = aperture_remove_all_conflicting_devices(exynos_drm_driver.name);
+       if (ret)
+               goto err_unbind_all;
+
        /* Try to bind all sub drivers. */
        ret = component_bind_all(drm->dev, drm);
        if (ret)

-- 
2.54.0

Reply via email to