Skip to contentSkip to conversation

drm/mxsfb: Remove generic DRM drivers in probe function

PATCH RESEND Applied Dario Binacchi 2 participants 2 messages Mar 5, 2025 – Mar 12, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND v3 1/1 drm/mxsfb: Remove generic DRM drivers in probe function

Use aperture helpers to remove all generic graphics drivers before loading mxsfb. Makes mxsfb compatible with simpledrm.

---

Changes in v3:
- Add 'Reviewed-by' of Thomas Zimmermann

Changes in v2:
- Use aperture_remove_all_conflicting_devices() instead of drm_aperture_remove_framebuffers().

 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +10 -0
index 59020862cf65..e5eb644b54ae 100644
@@ -8,6 +8,7 @@
  * Copyright (C) 2008 Embedded Alley Solutions, Inc All Rights Reserved.
  */
 
+#include <linux/aperture.h>
 #include <linux/clk.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
@@ -361,6 +362,15 @@ static int mxsfb_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_free;
 
+	/*
+	 * Remove early framebuffers (ie. simplefb). The framebuffer can be
+	 * located anywhere in RAM
+	 */
+	ret = aperture_remove_all_conflicting_devices(mxsfb_driver.name);
+	if (ret)
+		return dev_err_probe(&pdev->dev, ret,
+				     "can't kick out existing framebuffers\n");
+
 	ret = drm_dev_register(drm, 0);
 	if (ret)
 		goto err_unload;
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw

Merged into drm-misc-next. Thanks for the patch.

Am 05.03.25 um 15:09 schrieb Dario Binacchi:

Quoted 48 lines

Use aperture helpers to remove all generic graphics drivers before loading mxsfb. Makes mxsfb compatible with simpledrm.

---

Changes in v3:
- Add 'Reviewed-by' of Thomas Zimmermann

Changes in v2:
- Use aperture_remove_all_conflicting_devices() instead of drm_aperture_remove_framebuffers().

  drivers/gpu/drm/mxsfb/mxsfb_drv.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +10 -0
index 59020862cf65..e5eb644b54ae 100644
@@ -8,6 +8,7 @@
   * Copyright (C) 2008 Embedded Alley Solutions, Inc All Rights Reserved.
   */
 
+#include <linux/aperture.h>
  #include <linux/clk.h>
  #include <linux/dma-mapping.h>
  #include <linux/io.h>
@@ -361,6 +362,15 @@ static int mxsfb_probe(struct platform_device *pdev)
  	if (ret)
  		goto err_free;
 
+	/*
+	 * Remove early framebuffers (ie. simplefb). The framebuffer can be
+	 * located anywhere in RAM
+	 */
+	ret = aperture_remove_all_conflicting_devices(mxsfb_driver.name);
+	if (ret)
+		return dev_err_probe(&pdev->dev, ret,
+				     "can't kick out existing framebuffers\n");
+
  	ret = drm_dev_register(drm, 0);
  	if (ret)
  		goto err_unload;
Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)