All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] EFI urgent fix
@ 2015-10-12 14:13 Matt Fleming
  2015-10-12 14:13 ` [PATCH] x86/efi: Fix multiple GOP device support Matt Fleming
  0 siblings, 1 reply; 13+ messages in thread
From: Matt Fleming @ 2015-10-12 14:13 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin
  Cc: Matt Fleming, linux-kernel, linux-efi, Kővágó,
	Zoltán, Matthew Garrett, stable

From: Matt Fleming <matt.fleming@intel.com>

Please pull the following fix from Zoltán which addresses a bug that
resulted in the the secondary GOP display being garbled when booting
using the EFI boot stub.

The following changes since commit 825fcfce81921c9cc4ef801d844793815721e458:

  MAINTAINERS: Change Matt Fleming's email address (2015-10-11 09:54:29 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent

for you to fetch changes up to dc1ea95fd23c36dd6be284334a0c8327d11d8c52:

  x86/efi: Fix multiple GOP device support (2015-10-11 11:40:54 +0100)

----------------------------------------------------------------
 * Fix booting using the EFI boot stub on platforms with multiple
   Graphics Output Protocol devices because currently the secondary
   display will be garbled on such systems - Zoltán Kővágó

----------------------------------------------------------------
Kővágó, Zoltán (1):
      x86/efi: Fix multiple GOP device support

 arch/x86/boot/compressed/eboot.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH] x86/efi: fix multiple GOP device support
@ 2015-09-19 13:40 Kővágó, Zoltán
       [not found] ` <fce1886dc0b07f374eb49a13746df5e47518d338.1442666763.git.DirtY.iCE.hu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Kővágó, Zoltán @ 2015-09-19 13:40 UTC (permalink / raw)
  To: linux-efi-u79uwXL29TY76Z2rM5mHXA; +Cc: Matt Fleming

When multiple GOP devices exists, but none of them implements ConOut,
the code should just choose the first GOP (according to the comments).
But currently fb_base will refer to the last GOP, while other parameters
to the first GOP, which will likely result in a garbled display.

Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
---

I can reliably reproducible this bug using my ASRock Z87M Extreme4
motherboard with CSM and integrated GPU disabled, and two PCIe video
cards (NVidia GT640 and GTX980), booting from efi-stub (booting from
grub works fine).  On the primary display the asrock logo remains and on
the secondary screen is garbled up completely.

 arch/x86/boot/compressed/eboot.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index ee1b6d3..db51c1f 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -667,6 +667,7 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto,
 		bool conout_found = false;
 		void *dummy = NULL;
 		u32 h = handles[i];
+		u32 current_fb_base;
 
 		status = efi_call_early(handle_protocol, h,
 					proto, (void **)&gop32);
@@ -678,7 +679,7 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto,
 		if (status == EFI_SUCCESS)
 			conout_found = true;
 
-		status = __gop_query32(gop32, &info, &size, &fb_base);
+		status = __gop_query32(gop32, &info, &size, &current_fb_base);
 		if (status == EFI_SUCCESS && (!first_gop || conout_found)) {
 			/*
 			 * Systems that use the UEFI Console Splitter may
@@ -692,6 +693,7 @@ setup_gop32(struct screen_info *si, efi_guid_t *proto,
 			pixel_format = info->pixel_format;
 			pixel_info = info->pixel_information;
 			pixels_per_scan_line = info->pixels_per_scan_line;
+			fb_base = current_fb_base;
 
 			/*
 			 * Once we've found a GOP supporting ConOut,
@@ -770,6 +772,7 @@ setup_gop64(struct screen_info *si, efi_guid_t *proto,
 		bool conout_found = false;
 		void *dummy = NULL;
 		u64 h = handles[i];
+		u32 current_fb_base;
 
 		status = efi_call_early(handle_protocol, h,
 					proto, (void **)&gop64);
@@ -781,7 +784,7 @@ setup_gop64(struct screen_info *si, efi_guid_t *proto,
 		if (status == EFI_SUCCESS)
 			conout_found = true;
 
-		status = __gop_query64(gop64, &info, &size, &fb_base);
+		status = __gop_query64(gop64, &info, &size, &current_fb_base);
 		if (status == EFI_SUCCESS && (!first_gop || conout_found)) {
 			/*
 			 * Systems that use the UEFI Console Splitter may
@@ -795,6 +798,7 @@ setup_gop64(struct screen_info *si, efi_guid_t *proto,
 			pixel_format = info->pixel_format;
 			pixel_info = info->pixel_information;
 			pixels_per_scan_line = info->pixels_per_scan_line;
+			fb_base = current_fb_base;
 
 			/*
 			 * Once we've found a GOP supporting ConOut,
-- 
2.5.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-10-14 15:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 14:13 [GIT PULL] EFI urgent fix Matt Fleming
2015-10-12 14:13 ` [PATCH] x86/efi: Fix multiple GOP device support Matt Fleming
2015-10-14 14:47   ` Ingo Molnar
2015-10-14 14:47     ` Ingo Molnar
2015-10-14 14:51     ` Ingo Molnar
2015-10-14 14:51       ` Ingo Molnar
2015-10-14 15:02       ` Matt Fleming
2015-10-14 15:04         ` Ingo Molnar
2015-10-14 15:04           ` Ingo Molnar
2015-10-14 15:10           ` Matt Fleming
2015-10-14 15:28   ` [tip:core/efi] " tip-bot for Kővágó, Zoltán
  -- strict thread matches above, loose matches on Subject: below --
2015-09-19 13:40 [PATCH] x86/efi: fix " Kővágó, Zoltán
     [not found] ` <fce1886dc0b07f374eb49a13746df5e47518d338.1442666763.git.DirtY.iCE.hu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-07 20:48   ` Matt Fleming

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.