Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

LoongArch: Enable ACPI BGRT handling

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>

authored by

Bibo Mao and committed by
Huacai Chen
d0bb0b60 e8dd556c

+5 -1
+4
arch/loongarch/kernel/acpi.c
··· 9 9 10 10 #include <linux/init.h> 11 11 #include <linux/acpi.h> 12 + #include <linux/efi-bgrt.h> 12 13 #include <linux/irq.h> 13 14 #include <linux/irqdomain.h> 14 15 #include <linux/memblock.h> ··· 212 211 213 212 /* Do not enable ACPI SPCR console by default */ 214 213 acpi_parse_spcr(earlycon_acpi_spcr_enable, false); 214 + 215 + if (IS_ENABLED(CONFIG_ACPI_BGRT)) 216 + acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); 215 217 216 218 return; 217 219
+1 -1
drivers/acpi/Kconfig
··· 451 451 452 452 config ACPI_BGRT 453 453 bool "Boottime Graphics Resource Table support" 454 - depends on EFI && (X86 || ARM64) 454 + depends on EFI && (X86 || ARM64 || LOONGARCH) 455 455 help 456 456 This driver adds support for exposing the ACPI Boottime Graphics 457 457 Resource Table, which allows the operating system to obtain