[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/10] efi/gop: Add support for BLT_ONLY adapters
From: |
Javier Martinez Canillas |
Subject: |
[PATCH 06/10] efi/gop: Add support for BLT_ONLY adapters |
Date: |
Tue, 25 Feb 2020 13:25:49 +0100 |
From: Alexander Graf <address@hidden>
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 <address@hidden>
Signed-off-by: Javier Martinez Canillas <address@hidden>
---
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 7f9d1c2dfa1..c9e40e8d4e9 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 12977741192..e4388127c66 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;
--
2.24.1
- [PATCH 00/10] A set of trivial patches from the Fedora package, Javier Martinez Canillas, 2020/02/25
- [PATCH 01/10] linux/getroot: Handle rssd storage device names, Javier Martinez Canillas, 2020/02/25
- [PATCH 02/10] efi: Print more debug info in our module loader, Javier Martinez Canillas, 2020/02/25
- [PATCH 03/10] Makefile: Make libgrub.pp depend on config-util.h, Javier Martinez Canillas, 2020/02/25
- [PATCH 04/10] kern: Add grub_debug_enabled(), Javier Martinez Canillas, 2020/02/25
- [PATCH 05/10] normal/completion: Fix possible NULL pointer dereference, Javier Martinez Canillas, 2020/02/25
- [PATCH 07/10] efi/uga: Use 64 bit for fb_base, Javier Martinez Canillas, 2020/02/25
- [PATCH 08/10] kern: Make grub_error() more verbose, Javier Martinez Canillas, 2020/02/25
- [PATCH 06/10] efi/gop: Add support for BLT_ONLY adapters,
Javier Martinez Canillas <=
- [PATCH 10/10] efi: Fix the type of grub_efi_status_t, Javier Martinez Canillas, 2020/02/25
- [PATCH 09/10] video: Add more debug output on GOP and UGA probing, Javier Martinez Canillas, 2020/02/25
- Re: [PATCH 00/10] A set of trivial patches from the Fedora package, Daniel Kiper, 2020/02/28