diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-03 18:05:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-03 18:05:52 -0500 |
commit | f5a8160c1e055c0fd8d16a5b3ac97c638365b0db (patch) | |
tree | ca713af0131da5424cd46d25e47127bc648a9259 /drivers/video | |
parent | 7eeef2abe87dc0d8c276f97ccfdb1f42d9d1e4d8 (diff) | |
parent | 78b9bc947b18ed16b6c2c573d774e6d54ad9452d (diff) |
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()
...
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/efifb.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index 4bfff349b1fb..95d293b7445a 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c | |||
@@ -114,6 +114,20 @@ static int efifb_setup(char *options) | |||
114 | return 0; | 114 | return 0; |
115 | } | 115 | } |
116 | 116 | ||
117 | static inline bool fb_base_is_valid(void) | ||
118 | { | ||
119 | if (screen_info.lfb_base) | ||
120 | return true; | ||
121 | |||
122 | if (!(screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE)) | ||
123 | return false; | ||
124 | |||
125 | if (screen_info.ext_lfb_base) | ||
126 | return true; | ||
127 | |||
128 | return false; | ||
129 | } | ||
130 | |||
117 | static int efifb_probe(struct platform_device *dev) | 131 | static int efifb_probe(struct platform_device *dev) |
118 | { | 132 | { |
119 | struct fb_info *info; | 133 | struct fb_info *info; |
@@ -141,7 +155,7 @@ static int efifb_probe(struct platform_device *dev) | |||
141 | screen_info.lfb_depth = 32; | 155 | screen_info.lfb_depth = 32; |
142 | if (!screen_info.pages) | 156 | if (!screen_info.pages) |
143 | screen_info.pages = 1; | 157 | screen_info.pages = 1; |
144 | if (!screen_info.lfb_base) { | 158 | if (!fb_base_is_valid()) { |
145 | printk(KERN_DEBUG "efifb: invalid framebuffer address\n"); | 159 | printk(KERN_DEBUG "efifb: invalid framebuffer address\n"); |
146 | return -ENODEV; | 160 | return -ENODEV; |
147 | } | 161 | } |
@@ -160,6 +174,14 @@ static int efifb_probe(struct platform_device *dev) | |||
160 | } | 174 | } |
161 | 175 | ||
162 | efifb_fix.smem_start = screen_info.lfb_base; | 176 | efifb_fix.smem_start = screen_info.lfb_base; |
177 | |||
178 | if (screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE) { | ||
179 | u64 ext_lfb_base; | ||
180 | |||
181 | ext_lfb_base = (u64)(unsigned long)screen_info.ext_lfb_base << 32; | ||
182 | efifb_fix.smem_start |= ext_lfb_base; | ||
183 | } | ||
184 | |||
163 | efifb_defined.bits_per_pixel = screen_info.lfb_depth; | 185 | efifb_defined.bits_per_pixel = screen_info.lfb_depth; |
164 | efifb_defined.xres = screen_info.lfb_width; | 186 | efifb_defined.xres = screen_info.lfb_width; |
165 | efifb_defined.yres = screen_info.lfb_height; | 187 | efifb_defined.yres = screen_info.lfb_height; |