From de20a58080ba3d1c2bf09aa79918eeaae07c646d7769df189d5efe3dc0c401b6 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 2 Feb 2017 10:13:57 +0000 Subject: [PATCH] Accepting request 454109 from home:algraf:branches:Base:System - Add support for BLT only EFI GOP adapters (FATE#322332) * grub2-efi-gop-add-blt.patch OBS-URL: https://build.opensuse.org/request/show/454109 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=248 --- grub2-efi-gop-add-blt.patch | 59 +++++++++++++++++++++++++++++++++++++ grub2.changes | 6 ++++ grub2.spec | 3 ++ 3 files changed, 68 insertions(+) create mode 100644 grub2-efi-gop-add-blt.patch diff --git a/grub2-efi-gop-add-blt.patch b/grub2-efi-gop-add-blt.patch new file mode 100644 index 0000000..7acf273 --- /dev/null +++ b/grub2-efi-gop-add-blt.patch @@ -0,0 +1,59 @@ +From dc56925653819582777ddc5c761a56f52dddd8f1 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Wed, 1 Feb 2017 23:10:45 +0100 +Subject: [PATCH] grub-core/video/efi_gop.c: Add support for BLT_ONLY adapters + +EFI GOP has support for multiple different bitness types of frame buffers +and for a special "BLT only" type which is always defined to be RGBx. + +Because grub2 doesn't ever directly access the frame buffer but instead +only renders graphics via the BLT interface anyway, we can easily support +these adapters. + +The reason this has come up now is the emerging support for virtio-gpu +in OVMF. That adapter does not have the notion of a memory mapped frame +buffer and thus is BLT only. + +Signed-off-by: Alexander Graf +--- + grub-core/video/efi_gop.c | 2 ++ + include/grub/efi/graphics_output.h | 3 ++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/grub-core/video/efi_gop.c b/grub-core/video/efi_gop.c +index 7f9d1c2..c9e40e8 100644 +--- a/grub-core/video/efi_gop.c ++++ b/grub-core/video/efi_gop.c +@@ -121,6 +121,7 @@ grub_video_gop_get_bpp (struct grub_efi_gop_mode_info *in) + { + case GRUB_EFI_GOT_BGRA8: + case GRUB_EFI_GOT_RGBA8: ++ case GRUB_EFI_GOT_BLT_ONLY: + return 32; + + case GRUB_EFI_GOT_BITMASK: +@@ -187,6 +188,7 @@ grub_video_gop_fill_real_mode_info (unsigned mode, + switch (in->pixel_format) + { + case GRUB_EFI_GOT_RGBA8: ++ case GRUB_EFI_GOT_BLT_ONLY: + out->red_mask_size = 8; + out->red_field_pos = 0; + out->green_mask_size = 8; +diff --git a/include/grub/efi/graphics_output.h b/include/grub/efi/graphics_output.h +index 1297774..e438812 100644 +--- a/include/grub/efi/graphics_output.h ++++ b/include/grub/efi/graphics_output.h +@@ -28,7 +28,8 @@ typedef enum + { + GRUB_EFI_GOT_RGBA8, + GRUB_EFI_GOT_BGRA8, +- GRUB_EFI_GOT_BITMASK ++ GRUB_EFI_GOT_BITMASK, ++ GRUB_EFI_GOT_BLT_ONLY, + } + grub_efi_gop_pixel_format_t; + +-- +1.8.5.6 + diff --git a/grub2.changes b/grub2.changes index 9db156a..0db4245 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 1 21:42:49 UTC 2017 - agraf@suse.com + +- Add support for BLT only EFI GOP adapters (FATE#322332) + * grub2-efi-gop-add-blt.patch + ------------------------------------------------------------------- Wed Jan 25 09:58:20 UTC 2017 - schwab@linux-m68k.org diff --git a/grub2.spec b/grub2.spec index 96ccc2b..b037776 100644 --- a/grub2.spec +++ b/grub2.spec @@ -244,6 +244,8 @@ Patch307: 0008-xen-factor-out-allocation-of-page-tables-into-separa.patch Patch308: 0009-xen-add-capability-to-load-initrd-outside-of-initial.patch Patch309: 0010-xen-modify-page-table-construction.patch Patch310: 0011-xen-add-capability-to-load-p2m-list-outside-of-kerne.patch +# Fix GOP BLT support (FATE#322332) +Patch311: grub2-efi-gop-add-blt.patch Requires: gettext-runtime %if 0%{?suse_version} >= 1140 @@ -497,6 +499,7 @@ swap partition while in resuming %patch308 -p1 %patch309 -p1 %patch310 -p1 +%patch311 -p1 # This simplifies patch handling without need to use git to create patch # that renames file