|
David Woodhouse |
4f94f04 |
From e9b10953edbccd3744e039ffc060ab2692f17856 Mon Sep 17 00:00:00 2001
|
|
David Woodhouse |
4f94f04 |
From: Matthew Garrett <mjg@redhat.com>
|
|
David Woodhouse |
4f94f04 |
Date: Fri, 27 Jul 2012 17:20:49 -0400
|
|
David Woodhouse |
4f94f04 |
Subject: [PATCH 2/2] x86, EFI: Calculate the EFI framebuffer size instead of
|
|
David Woodhouse |
4f94f04 |
trusting the firmware
|
|
David Woodhouse |
4f94f04 |
|
|
David Woodhouse |
4f94f04 |
Seth Forshee reported that his system was reporting that the EFI framebuffer
|
|
David Woodhouse |
4f94f04 |
stretched from 0x90010000-0xb0010000 despite the GPU's BAR only covering
|
|
David Woodhouse |
4f94f04 |
0x90000000-0x9ffffff. It's safer to calculate this value from the pixel
|
|
David Woodhouse |
4f94f04 |
stride and screen height (values we already depend on) rather than face
|
|
David Woodhouse |
4f94f04 |
potential problems with resource allocation later on.
|
|
David Woodhouse |
4f94f04 |
|
|
David Woodhouse |
4f94f04 |
Signed-off-by: Matthew Garrett <mjg@redhat.com>
|
|
David Woodhouse |
4f94f04 |
Tested-by: Seth Forshee <seth.forshee@canonical.com>
|
|
David Woodhouse |
4f94f04 |
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
David Woodhouse |
4f94f04 |
---
|
|
David Woodhouse |
4f94f04 |
arch/x86/boot/compressed/eboot.c | 3 ++-
|
|
David Woodhouse |
4f94f04 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
David Woodhouse |
4f94f04 |
|
|
David Woodhouse |
4f94f04 |
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
|
|
David Woodhouse |
4f94f04 |
index bbd83b9..c760e07 100644
|
|
David Woodhouse |
4f94f04 |
--- a/arch/x86/boot/compressed/eboot.c
|
|
David Woodhouse |
4f94f04 |
+++ b/arch/x86/boot/compressed/eboot.c
|
|
David Woodhouse |
4f94f04 |
@@ -331,7 +331,6 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
|
|
David Woodhouse |
4f94f04 |
si->lfb_width = width;
|
|
David Woodhouse |
4f94f04 |
si->lfb_height = height;
|
|
David Woodhouse |
4f94f04 |
si->lfb_base = fb_base;
|
|
David Woodhouse |
4f94f04 |
- si->lfb_size = fb_size;
|
|
David Woodhouse |
4f94f04 |
si->pages = 1;
|
|
David Woodhouse |
4f94f04 |
|
|
David Woodhouse |
4f94f04 |
if (pixel_format == PIXEL_RGB_RESERVED_8BIT_PER_COLOR) {
|
|
David Woodhouse |
4f94f04 |
@@ -379,6 +378,8 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
|
|
David Woodhouse |
4f94f04 |
si->rsvd_pos = 0;
|
|
David Woodhouse |
4f94f04 |
}
|
|
David Woodhouse |
4f94f04 |
|
|
David Woodhouse |
4f94f04 |
+ si->lfb_size = si->lfb_linelength * si->lfb_height;
|
|
David Woodhouse |
4f94f04 |
+
|
|
David Woodhouse |
4f94f04 |
si->capabilities |= VIDEO_CAPABILITY_SKIP_QUIRKS;
|
|
David Woodhouse |
4f94f04 |
|
|
David Woodhouse |
4f94f04 |
free_handle:
|
|
David Woodhouse |
4f94f04 |
--
|
|
David Woodhouse |
4f94f04 |
1.7.12.1
|
|
David Woodhouse |
4f94f04 |
|