diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2018-01-24 18:57:36 +0800 |
---|---|---|
committer | Benjamin You <benjamin.you@intel.com> | 2018-01-30 14:05:59 +0800 |
commit | 864701886fc311410bfbaa3d00dc2e624e0dc387 (patch) | |
tree | d10834cdd789bec823be90bbb077d091c1d61abe /CorebootPayloadPkg | |
parent | 877251b4212dedaabefbc3ef6cd637a5b2740d47 (diff) | |
download | edk2-864701886fc311410bfbaa3d00dc2e624e0dc387.tar.gz edk2-864701886fc311410bfbaa3d00dc2e624e0dc387.tar.bz2 edk2-864701886fc311410bfbaa3d00dc2e624e0dc387.zip |
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>
Diffstat (limited to 'CorebootPayloadPkg')
-rw-r--r-- | CorebootPayloadPkg/FbGop/FbGop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CorebootPayloadPkg/FbGop/FbGop.c b/CorebootPayloadPkg/FbGop/FbGop.c index 37d6def7f7..6790617033 100644 --- a/CorebootPayloadPkg/FbGop/FbGop.c +++ b/CorebootPayloadPkg/FbGop/FbGop.c @@ -822,7 +822,7 @@ FbGopCheckForVbe ( BitsPerPixel = pFbInfo->BitsPerPixel;
HorizontalResolution = pFbInfo->HorizontalResolution;
VerticalResolution = pFbInfo->VerticalResolution;
- BytesPerScanLine = HorizontalResolution * (BitsPerPixel / 8);
+ BytesPerScanLine = pFbInfo->BytesPerScanLine;
ModeBuffer = (FB_VIDEO_MODE_DATA *) AllocatePool (
ModeNumber * sizeof (FB_VIDEO_MODE_DATA)
|