]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/tidss: Remove early fb
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 16 Apr 2025 11:06:30 +0000 (14:06 +0300)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 13 Aug 2025 08:11:02 +0000 (11:11 +0300)
Add a call to drm_aperture_remove_framebuffers() to drop the possible
early fb (simplefb).

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250416-tidss-splash-v1-2-4ff396eb5008@ideasonboard.com
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
drivers/gpu/drm/tidss/tidss_drv.c

index a1b12e52aca476578d1327cdfef517e20d0a2a91..27d9a8fd541fc164f2fb2535f148432bd7895f46 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/of.h>
 #include <linux/module.h>
 #include <linux/pm_runtime.h>
+#include <linux/aperture.h>
 
 #include <drm/clients/drm_client_setup.h>
 #include <drm/drm_atomic.h>
@@ -192,12 +193,20 @@ static int tidss_probe(struct platform_device *pdev)
                goto err_irq_uninstall;
        }
 
+       /* Remove possible early fb before setting up the fbdev */
+       ret = aperture_remove_all_conflicting_devices(tidss_driver.name);
+       if (ret)
+               goto err_drm_dev_unreg;
+
        drm_client_setup(ddev, NULL);
 
        dev_dbg(dev, "%s done\n", __func__);
 
        return 0;
 
+err_drm_dev_unreg:
+       drm_dev_unregister(ddev);
+
 err_irq_uninstall:
        tidss_irq_uninstall(ddev);