All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/stm: remove conflicting framebuffers
@ 2021-12-03  8:55 ` Yannick Fertre
  0 siblings, 0 replies; 14+ messages in thread
From: Yannick Fertre @ 2021-12-03  8:55 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel

In case of using simplefb or another conflicting framebuffer,
call drm_aperture_remove_framebuffers() to remove memory allocated.

Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
---
 drivers/gpu/drm/stm/drv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c
index 222869b232ae..5ba46f70f081 100644
--- a/drivers/gpu/drm/stm/drv.c
+++ b/drivers/gpu/drm/stm/drv.c
@@ -14,6 +14,7 @@
 #include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
 
+#include <drm/drm_aperture.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
@@ -193,6 +194,10 @@ static int stm_drm_platform_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_put;
 
+	ret = drm_aperture_remove_framebuffers(false, &drv_driver);
+	if (ret)
+		goto err_put;
+
 	ret = drm_dev_register(ddev, 0);
 	if (ret)
 		goto err_put;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH] drm/stm: remove conflicting framebuffers
@ 2021-12-06 13:47 ` Yannick Fertre
  0 siblings, 0 replies; 14+ messages in thread
From: Yannick Fertre @ 2021-12-06 13:47 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Raphael Gallais-Pou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel

In case of using simplefb or another conflicting framebuffer,
call drm_aperture_remove_framebuffers() to remove memory allocated.

Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
---
 drivers/gpu/drm/stm/drv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c
index 222869b232ae..9f441aadf2d5 100644
--- a/drivers/gpu/drm/stm/drv.c
+++ b/drivers/gpu/drm/stm/drv.c
@@ -14,6 +14,7 @@
 #include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
 
+#include <drm/drm_aperture.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
@@ -183,6 +184,10 @@ static int stm_drm_platform_probe(struct platform_device *pdev)
 
 	DRM_DEBUG("%s\n", __func__);
 
+	ret = drm_aperture_remove_framebuffers(false, &drv_driver);
+	if (ret)
+		return ret;
+
 	dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
 
 	ddev = drm_dev_alloc(&drv_driver, dev);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-01-04 13:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03  8:55 [PATCH] drm/stm: remove conflicting framebuffers Yannick Fertre
2021-12-03  8:55 ` Yannick Fertre
2021-12-03  9:35 ` Thomas Zimmermann
2021-12-03  9:35   ` Thomas Zimmermann
2021-12-06 13:42   ` yannick Fertre
2021-12-06 13:42     ` yannick Fertre
2021-12-06 13:47 Yannick Fertre
2021-12-06 13:47 ` Yannick Fertre
2021-12-06 14:23 ` Thomas Zimmermann
2021-12-06 14:23   ` Thomas Zimmermann
2021-12-14 10:15   ` Philippe CORNU
2021-12-14 10:15     ` Philippe CORNU
2022-01-04 13:52     ` Philippe CORNU
2022-01-04 13:52       ` Philippe CORNU

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.