From 49bd201996152822e3f5f9aa3a7f8da3518a7b42 Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <tzimmermann@suse.de>
Date: Thu, 10 Nov 2022 09:27:41 +0100
Subject: [PATCH] bsc#1204315: Disable sysfb before creating simple-framebuffer
from DT
Patch-mainline: Never, internal workaround
References: bsc#1204315
Otherwise sysfb will create a second platform device for the same
framebuffer. Avoids warning about duplicate resource usage.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/of/platform.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 3507095a69f6..278d6d6fa516 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -20,6 +20,7 @@
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
+#include <linux/sysfb.h>
const struct of_device_id of_default_bus_match_table[] = {
{ .compatible = "simple-bus", },
@@ -583,6 +584,7 @@ static int __init of_platform_default_populate_init(void)
of_node_put(node);
}
+ sysfb_disable();
node = of_get_compatible_child(of_chosen, "simple-framebuffer");
of_platform_device_create(node, NULL, NULL);
of_node_put(node);
--
2.38.0