]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
LoongArch: Enable ACPI BGRT handling
authorBibo Mao <maobibo@loongson.cn>
Tue, 24 Sep 2024 07:32:06 +0000 (15:32 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Tue, 24 Sep 2024 07:32:06 +0000 (15:32 +0800)
Add ACPI BGRT support on LoongArch so it can display image provied by
acpi table at boot stage and switch to graphical UI smoothly.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/acpi.c
drivers/acpi/Kconfig

index 929a497c987e84308d2e301bfd8df95534641345..f1a74b80f22c547870eb68a13692369cd354658a 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <linux/init.h>
 #include <linux/acpi.h>
+#include <linux/efi-bgrt.h>
 #include <linux/irq.h>
 #include <linux/irqdomain.h>
 #include <linux/memblock.h>
@@ -212,6 +213,9 @@ void __init acpi_boot_table_init(void)
        /* Do not enable ACPI SPCR console by default */
        acpi_parse_spcr(earlycon_acpi_spcr_enable, false);
 
+       if (IS_ENABLED(CONFIG_ACPI_BGRT))
+               acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);
+
        return;
 
 fdt_earlycon:
index e3a7c2aedd5f005c1f60b1b8cf05eaa54ad462a4..d67f63d93b2abd6b004f05c8f191cb0c3ae7e0d4 100644 (file)
@@ -451,7 +451,7 @@ config ACPI_HED
 
 config ACPI_BGRT
        bool "Boottime Graphics Resource Table support"
-       depends on EFI && (X86 || ARM64)
+       depends on EFI && (X86 || ARM64 || LOONGARCH)
        help
          This driver adds support for exposing the ACPI Boottime Graphics
          Resource Table, which allows the operating system to obtain