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.

Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20250305140929.174398-1-dario.binacchi@amarulasolutions.com
This commit is contained in:
Dario Binacchi
2025-03-12 09:14:29 +01:00
committed by Thomas Zimmermann
parent edd9231f3a
commit c8e7b185d4
+10
View File
@@ -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>
@@ -359,6 +360,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;