public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] CorebootPayloadPkg: Use correct BytesPerScanLine
@ 2018-01-24 10:57 arthur
  2018-01-25  5:34 ` You, Benjamin
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: arthur @ 2018-01-24 10:57 UTC (permalink / raw)
  To: edk2-devel; +Cc: Arthur Heymans

From: Arthur Heymans <arthur@aheymans.xyz>

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>

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)
-- 
2.16.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-02-08 18:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-24 10:57 [PATCH] CorebootPayloadPkg: Use correct BytesPerScanLine arthur
2018-01-25  5:34 ` You, Benjamin
2018-01-25  9:03   ` Arthur Heymans
2018-01-26  8:40     ` You, Benjamin
2018-01-26  9:08       ` Arthur Heymans
2018-01-27  4:11         ` You, Benjamin
2018-01-27 10:17           ` Arthur Heymans
2018-01-27 14:14           ` Nico Huber
2018-01-28  8:49             ` You, Benjamin
2018-01-28 14:33               ` Nico Huber
2018-01-29  1:09                 ` You, Benjamin
2018-01-29  5:36 ` You, Benjamin
2018-01-30  6:15 ` You, Benjamin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox