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