grub-core/video/efi_gop.c: Add support for BLT_ONLY adapters
PATCH 1/1 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.
--- grub-core/video/efi_gop.c | 2 ++ include/grub/efi/graphics_output.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)
grub-core/video/efi_gop.c +2 -0
@@ -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 ;
include/grub/efi/graphics_output.h +2 -1
@@ -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;
Signature · 1 line
1.8.5.6
Quoted 7 lines · On Wed, 1 Feb 2017, 23:14 Alexander Graf <[email protected]> wrote:
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.
We do use direct framebuffer.
Quoted 56 lines
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 <[email protected]>--- grub-core/video/efi_gop.c | 2 ++ include/grub/efi/graphics_output.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)grub-core/video/efi_gop.c +1
-0@@ -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:grub-core/video/efi_gop.c +1
-0@@ -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 ;include/grub/efi/graphics_output.h +2
-2@@ -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
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 4 lines · On Thu, 2 Feb 2017, 00:19 Vladimir 'phcoder' Serbinenko <[email protected]>…
On Wed, 1 Feb 2017, 23:14 Alexander Graf <[email protected]> wrote:
Quoted 9 lines
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.
We do use direct framebuffer.
I take that back. Let's discuss the patch after release.
Quoted 57 lines
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 <[email protected]>--- grub-core/video/efi_gop.c | 2 ++ include/grub/efi/graphics_output.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)grub-core/video/efi_gop.c +1
-0@@ -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:grub-core/video/efi_gop.c +1
-0@@ -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 ;include/grub/efi/graphics_output.h +2
-2@@ -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
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel