Skip to content

Commit 39feaa3

Browse files
committed
Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull EFI fix from Ingo Molnar: "Fix an EFI-fb regression that affects certain x86 systems" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: fbdev/efifb: Ignore framebuffer memmap entries that lack any memory types
2 parents 1335d9a + f858553 commit 39feaa3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/video/fbdev/efifb.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,12 @@ static int efifb_probe(struct platform_device *dev)
477477
* If the UEFI memory map covers the efifb region, we may only
478478
* remap it using the attributes the memory map prescribes.
479479
*/
480-
mem_flags |= EFI_MEMORY_WT | EFI_MEMORY_WB;
481-
mem_flags &= md.attribute;
480+
md.attribute &= EFI_MEMORY_UC | EFI_MEMORY_WC |
481+
EFI_MEMORY_WT | EFI_MEMORY_WB;
482+
if (md.attribute) {
483+
mem_flags |= EFI_MEMORY_WT | EFI_MEMORY_WB;
484+
mem_flags &= md.attribute;
485+
}
482486
}
483487
if (mem_flags & EFI_MEMORY_WC)
484488
info->screen_base = ioremap_wc(efifb_fix.smem_start,

0 commit comments

Comments
 (0)