aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuacai Chen2022-07-04 09:17:04 +0800
committerJavier Martinez Canillas2023-05-15 13:36:30 +0200
commit60aebc9559492cea6a9625f514a8041717e3a2e4 (patch)
tree21198f0a7e3eaccb9ba24bd97b2ed27c52a2734d
parent8bb7c7bca5b70f3cd22d95b4d36029295c4274f6 (diff)
drivers/firmware: Move sysfb_init() from device_initcall to subsys_initcall_sync
Consider a configuration like this: 1, efifb (or simpledrm) is built-in; 2, a native display driver (such as radeon) is also built-in. As Javier said, this is not a common configuration (the native display driver is usually built as a module), but it can happen and cause some trouble. In this case, since efifb, radeon and sysfb are all in device_initcall() level, the order in practise is like this: efifb registered at first, but no "efi-framebuffer" device yet. radeon registered later, and /dev/fb0 created. sysfb_init() comes at last, it registers "efi-framebuffer" and then causes an error message "efifb: a framebuffer is already registered". Make sysfb_init() to be subsys_ initcall_sync() can avoid this. And Javier Martinez Canillas is trying to make a more general solution in commit 873eb3b11860 ("fbdev: Disable sysfb device registration when removing conflicting FBs"). However, this patch still makes sense because it can make the screen display as early as possible (We cannot move to subsys_initcall, since sysfb_init() should be executed after PCI enumeration). Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220704011704.1418055-1-chenhuacai@loongson.cn
-rw-r--r--drivers/firmware/sysfb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/sysfb.c b/drivers/firmware/sysfb.c
index 3c197db42c9d..82fcfd29bc4d 100644
--- a/drivers/firmware/sysfb.c
+++ b/drivers/firmware/sysfb.c
@@ -128,4 +128,4 @@ unlock_mutex:
}
/* must execute after PCI subsystem for EFI quirks */
-device_initcall(sysfb_init);
+subsys_initcall_sync(sysfb_init);