aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/fbdev/efifb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
index 9e529cc2b4ff..9f39f0c360e0 100644
--- a/drivers/video/fbdev/efifb.c
+++ b/drivers/video/fbdev/efifb.c
@@ -477,8 +477,12 @@ static int efifb_probe(struct platform_device *dev)
477 * If the UEFI memory map covers the efifb region, we may only 477 * If the UEFI memory map covers the efifb region, we may only
478 * remap it using the attributes the memory map prescribes. 478 * remap it using the attributes the memory map prescribes.
479 */ 479 */
480 mem_flags |= EFI_MEMORY_WT | EFI_MEMORY_WB; 480 md.attribute &= EFI_MEMORY_UC | EFI_MEMORY_WC |
481 mem_flags &= md.attribute; 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 }
482 } 486 }
483 if (mem_flags & EFI_MEMORY_WC) 487 if (mem_flags & EFI_MEMORY_WC)
484 info->screen_base = ioremap_wc(efifb_fix.smem_start, 488 info->screen_base = ioremap_wc(efifb_fix.smem_start,