From 0fd92cbb351a7ae652ceb047516ad4f00a85ddb6 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 6 May 2025 14:21:26 -0400 Subject: set max res for gop framebuffer --- kernel/efi/gop.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kernel/efi/gop.c') diff --git a/kernel/efi/gop.c b/kernel/efi/gop.c index 899bbee..5495980 100644 --- a/kernel/efi/gop.c +++ b/kernel/efi/gop.c @@ -4,6 +4,8 @@ static EFI_GRAPHICS_OUTPUT_PROTOCOL *gop = NULL; +#define MAX_H_RES 1920 + EFI_STATUS efi_load_gop(EFI_SYSTEM_TABLE *ST) { EFI_STATUS status = EFI_SUCCESS; @@ -33,6 +35,8 @@ EFI_STATUS efi_load_gop(EFI_SYSTEM_TABLE *ST) if (info->PixelFormat != PixelBlueGreenRedReserved8BitPerColor && info->PixelFormat != PixelRedGreenBlueReserved8BitPerColor) continue; + if (info->HorizontalResolution > MAX_H_RES) + continue; if (info->HorizontalResolution > width) { width = info->HorizontalResolution; best = i; -- cgit v1.2.3-freya