Files
nix-config/packages/edk2/patches/platforms/0019-Update-DisplayDxe.c.patch
2026-01-07 21:28:20 -06:00

49 lines
1.7 KiB
Diff

From deaab4b9f67f7fbfd982a7f43485c2bceba1e9b9 Mon Sep 17 00:00:00 2001
From: MattP <63603528+NumberOneGit@users.noreply.github.com>
Date: Thu, 8 May 2025 14:40:25 -0400
Subject: [PATCH 19/29] Update DisplayDxe.c
Fill reserved bit to enable FB
---
Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.c b/Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.c
index 3eba98e5..800f7a90 100644
--- a/Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.c
+++ b/Platform/RaspberryPi/Drivers/DisplayDxe/DisplayDxe.c
@@ -211,6 +211,7 @@ ClearScreen (
Fill.Red = 0x00;
Fill.Green = 0x00;
Fill.Blue = 0x00;
+ Fill.Reserved = 0xFF;
This->Blt (This, &Fill, EfiBltVideoFill,
0, 0, 0, 0, This->Mode->Info->HorizontalResolution,
This->Mode->Info->VerticalResolution,
@@ -319,6 +320,7 @@ DisplayBlt (
for (i = 0; i < Height; i++) {
VidBuf = POS_TO_FB (DestinationX, DestinationY + i);
+ ((EFI_GRAPHICS_OUTPUT_BLT_PIXEL*)BltBuf)->Reserved = 0xFF;
SetMem32 (VidBuf, Width * PI3_BYTES_PER_PIXEL, *(UINT32*)BltBuf);
}
@@ -345,6 +347,14 @@ DisplayBlt (
}
for (i = 0; i < Height; i++) {
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL *PixelRow = (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)
+ ((UINTN)BltBuffer + (SourceY + i) * Delta + SourceX * PI3_BYTES_PER_PIXEL);
+
+ for (UINTN x = 0; x < Width; x++) {
+ if (PixelRow[x].Reserved != 0xFF) {
+ PixelRow[x].Reserved = 0xFF;
+ }
+ }
VidBuf = POS_TO_FB (DestinationX, DestinationY + i);
BltBuf = (UINT8*)((UINTN)BltBuffer + (SourceY + i) * Delta +
SourceX * PI3_BYTES_PER_PIXEL);
--
2.51.2