|
|
28f7f8 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
28f7f8 |
From: Alexander Graf <agraf@suse.de>
|
|
|
28f7f8 |
Date: Wed, 1 Feb 2017 23:10:45 +0100
|
|
|
28f7f8 |
Subject: [PATCH] grub-core/video/efi_gop.c: Add support for BLT_ONLY adapters
|
|
|
28f7f8 |
|
|
|
28f7f8 |
EFI GOP has support for multiple different bitness types of frame buffers
|
|
|
28f7f8 |
and for a special "BLT only" type which is always defined to be RGBx.
|
|
|
28f7f8 |
|
|
|
28f7f8 |
Because grub2 doesn't ever directly access the frame buffer but instead
|
|
|
28f7f8 |
only renders graphics via the BLT interface anyway, we can easily support
|
|
|
28f7f8 |
these adapters.
|
|
|
28f7f8 |
|
|
|
28f7f8 |
The reason this has come up now is the emerging support for virtio-gpu
|
|
|
28f7f8 |
in OVMF. That adapter does not have the notion of a memory mapped frame
|
|
|
28f7f8 |
buffer and thus is BLT only.
|
|
|
28f7f8 |
|
|
|
28f7f8 |
Signed-off-by: Alexander Graf <agraf@suse.de>
|
|
|
28f7f8 |
---
|
|
|
28f7f8 |
grub-core/video/efi_gop.c | 2 ++
|
|
|
28f7f8 |
include/grub/efi/graphics_output.h | 3 ++-
|
|
|
28f7f8 |
2 files changed, 4 insertions(+), 1 deletion(-)
|
|
|
28f7f8 |
|
|
|
28f7f8 |
diff --git a/grub-core/video/efi_gop.c b/grub-core/video/efi_gop.c
|
|
|
28f7f8 |
index 7f9d1c2dfa1..c9e40e8d4e9 100644
|
|
|
28f7f8 |
--- a/grub-core/video/efi_gop.c
|
|
|
28f7f8 |
+++ b/grub-core/video/efi_gop.c
|
|
|
28f7f8 |
@@ -121,6 +121,7 @@ grub_video_gop_get_bpp (struct grub_efi_gop_mode_info *in)
|
|
|
28f7f8 |
{
|
|
|
28f7f8 |
case GRUB_EFI_GOT_BGRA8:
|
|
|
28f7f8 |
case GRUB_EFI_GOT_RGBA8:
|
|
|
28f7f8 |
+ case GRUB_EFI_GOT_BLT_ONLY:
|
|
|
28f7f8 |
return 32;
|
|
|
28f7f8 |
|
|
|
28f7f8 |
case GRUB_EFI_GOT_BITMASK:
|
|
|
28f7f8 |
@@ -187,6 +188,7 @@ grub_video_gop_fill_real_mode_info (unsigned mode,
|
|
|
28f7f8 |
switch (in->pixel_format)
|
|
|
28f7f8 |
{
|
|
|
28f7f8 |
case GRUB_EFI_GOT_RGBA8:
|
|
|
28f7f8 |
+ case GRUB_EFI_GOT_BLT_ONLY:
|
|
|
28f7f8 |
out->red_mask_size = 8;
|
|
|
28f7f8 |
out->red_field_pos = 0;
|
|
|
28f7f8 |
out->green_mask_size = 8;
|
|
|
28f7f8 |
diff --git a/include/grub/efi/graphics_output.h b/include/grub/efi/graphics_output.h
|
|
|
28f7f8 |
index 12977741192..e4388127c66 100644
|
|
|
28f7f8 |
--- a/include/grub/efi/graphics_output.h
|
|
|
28f7f8 |
+++ b/include/grub/efi/graphics_output.h
|
|
|
28f7f8 |
@@ -28,7 +28,8 @@ typedef enum
|
|
|
28f7f8 |
{
|
|
|
28f7f8 |
GRUB_EFI_GOT_RGBA8,
|
|
|
28f7f8 |
GRUB_EFI_GOT_BGRA8,
|
|
|
28f7f8 |
- GRUB_EFI_GOT_BITMASK
|
|
|
28f7f8 |
+ GRUB_EFI_GOT_BITMASK,
|
|
|
28f7f8 |
+ GRUB_EFI_GOT_BLT_ONLY,
|
|
|
28f7f8 |
}
|
|
|
28f7f8 |
grub_efi_gop_pixel_format_t;
|
|
|
28f7f8 |
|