summaryrefslogtreecommitdiff
path: root/user/grub/0007-efi_gop-shadow.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2023-10-01 03:44:11 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2023-10-03 21:56:52 -0500
commit8b868f32f7e1b57c90da65157ea59eb6ce337cc9 (patch)
tree3659db750a529d3e7abf0bc2c4f1fdbb3f0886af /user/grub/0007-efi_gop-shadow.patch
parent2c9ea8d0ea3c4510b5a4c9314c84c4444c933726 (diff)
downloadpackages-8b868f32f7e1b57c90da65157ea59eb6ce337cc9.tar.gz
packages-8b868f32f7e1b57c90da65157ea59eb6ce337cc9.tar.bz2
packages-8b868f32f7e1b57c90da65157ea59eb6ce337cc9.tar.xz
packages-8b868f32f7e1b57c90da65157ea59eb6ce337cc9.zip
user/grub: Update to 2.12_rc1
Fixes: #1065, #1066, #1073
Diffstat (limited to 'user/grub/0007-efi_gop-shadow.patch')
-rw-r--r--user/grub/0007-efi_gop-shadow.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/user/grub/0007-efi_gop-shadow.patch b/user/grub/0007-efi_gop-shadow.patch
new file mode 100644
index 000000000..7709641cd
--- /dev/null
+++ b/user/grub/0007-efi_gop-shadow.patch
@@ -0,0 +1,37 @@
+From 34a3adff822a6d136430e631d0a93448b27fac4e Mon Sep 17 00:00:00 2001
+From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
+Date: Mon, 28 Aug 2023 23:50:09 +0200
+Subject: video/efi_gop: Require shadow if PixelBltOnly
+
+If the EFI graphics pixel format is PixelBltOnly, we cannot write directly
+to the frame buffer. We need the shadow frame buffer which we copy via
+the BitBlt operation to the hardware.
+
+If the pixel format is PixelBltOnly and allocation of the shadow frame
+buffer fails, we must raise an error to signal that the EFI GOP protocol
+is not usable.
+
+Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+---
+ grub-core/video/efi_gop.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/grub-core/video/efi_gop.c b/grub-core/video/efi_gop.c
+index 7247aee..9452f5e 100644
+--- a/grub-core/video/efi_gop.c
++++ b/grub-core/video/efi_gop.c
+@@ -480,6 +480,10 @@ grub_video_gop_setup (unsigned int width, unsigned int height,
+ if (!buffer)
+ {
+ grub_dprintf ("video", "GOP: couldn't allocate shadow\n");
++
++ if (info->pixel_format == GRUB_EFI_GOT_BLT_ONLY)
++ return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
++
+ grub_errno = 0;
+ grub_video_gop_fill_mode_info (gop->mode->mode, info,
+ &framebuffer.mode_info);
+--
+cgit v1.1
+