mirror of https://github.com/acidanthera/audk.git
CorebootPayloadPkg: Use correct BytesPerScanLine
Fetch BytesPerScanLine from coreboot table to reflect how the actual framebuffer is set up instead of guessing it from the horizontal resolution. This fixes a garbled display when HorizontalResolution * (BitsPerPixel / 8) and pFbInfo->BytesPerScanLine don't match. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Benjamin You <benjamin.you@intel.com>
This commit is contained in:
parent
877251b421
commit
864701886f
|
@ -822,7 +822,7 @@ FbGopCheckForVbe (
|
||||||
BitsPerPixel = pFbInfo->BitsPerPixel;
|
BitsPerPixel = pFbInfo->BitsPerPixel;
|
||||||
HorizontalResolution = pFbInfo->HorizontalResolution;
|
HorizontalResolution = pFbInfo->HorizontalResolution;
|
||||||
VerticalResolution = pFbInfo->VerticalResolution;
|
VerticalResolution = pFbInfo->VerticalResolution;
|
||||||
BytesPerScanLine = HorizontalResolution * (BitsPerPixel / 8);
|
BytesPerScanLine = pFbInfo->BytesPerScanLine;
|
||||||
|
|
||||||
ModeBuffer = (FB_VIDEO_MODE_DATA *) AllocatePool (
|
ModeBuffer = (FB_VIDEO_MODE_DATA *) AllocatePool (
|
||||||
ModeNumber * sizeof (FB_VIDEO_MODE_DATA)
|
ModeNumber * sizeof (FB_VIDEO_MODE_DATA)
|
||||||
|
|
Loading…
Reference in New Issue