mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
Merge branch 'core-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull EFI changes from Ingo Molnar:
"The main changes in this cycle were:
- further EFI code generalization to make it more workable for ARM64
- various extensions, such as 64-bit framebuffer address support,
UEFI v2.5 EFI_PROPERTIES_TABLE support
- code modularization simplifications and cleanups
- new debugging parameters
- various fixes and smaller additions"
* 'core-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
efi: Fix warning of int-to-pointer-cast on x86 32-bit builds
efi: Use correct type for struct efi_memory_map::phys_map
x86/efi: Fix kernel panic when CONFIG_DEBUG_VIRTUAL is enabled
efi: Add "efi_fake_mem" boot option
x86/efi: Rename print_efi_memmap() to efi_print_memmap()
efi: Auto-load the efi-pstore module
efi: Introduce EFI_NX_PE_DATA bit and set it from properties table
efi: Add support for UEFIv2.5 Properties table
efi: Add EFI_MEMORY_MORE_RELIABLE support to efi_md_typeattr_format()
efifb: Add support for 64-bit frame buffer addresses
efi/arm64: Clean up efi_get_fdt_params() interface
arm64: Use core efi=debug instead of uefi_debug command line parameter
efi/x86: Move efi=debug option parsing to core
drivers/firmware: Make efi/esrt.c driver explicitly non-modular
efi: Use the generic efi.memmap instead of 'memmap'
acpi/apei: Use appropriate pgprot_t to map GHES memory
arm64, acpi/apei: Implement arch_apei_get_mem_attributes()
arm64/mm: Add PROT_DEVICE_nGnRnE and PROT_NORMAL_WT
acpi, x86: Implement arch_apei_get_mem_attributes()
efi, x86: Rearrange efi_mem_attributes()
...
This commit is contained in:
commit
f5a8160c1e
26 changed files with 532 additions and 105 deletions
|
|
@ -114,6 +114,20 @@ static int efifb_setup(char *options)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline bool fb_base_is_valid(void)
|
||||
{
|
||||
if (screen_info.lfb_base)
|
||||
return true;
|
||||
|
||||
if (!(screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE))
|
||||
return false;
|
||||
|
||||
if (screen_info.ext_lfb_base)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static int efifb_probe(struct platform_device *dev)
|
||||
{
|
||||
struct fb_info *info;
|
||||
|
|
@ -141,7 +155,7 @@ static int efifb_probe(struct platform_device *dev)
|
|||
screen_info.lfb_depth = 32;
|
||||
if (!screen_info.pages)
|
||||
screen_info.pages = 1;
|
||||
if (!screen_info.lfb_base) {
|
||||
if (!fb_base_is_valid()) {
|
||||
printk(KERN_DEBUG "efifb: invalid framebuffer address\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
@ -160,6 +174,14 @@ static int efifb_probe(struct platform_device *dev)
|
|||
}
|
||||
|
||||
efifb_fix.smem_start = screen_info.lfb_base;
|
||||
|
||||
if (screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE) {
|
||||
u64 ext_lfb_base;
|
||||
|
||||
ext_lfb_base = (u64)(unsigned long)screen_info.ext_lfb_base << 32;
|
||||
efifb_fix.smem_start |= ext_lfb_base;
|
||||
}
|
||||
|
||||
efifb_defined.bits_per_pixel = screen_info.lfb_depth;
|
||||
efifb_defined.xres = screen_info.lfb_width;
|
||||
efifb_defined.yres = screen_info.lfb_height;
|
||||
|
|
|
|||
Loading…
Reference in a new issue