Hi Arthur, There is a related fix in the same file (FbGop.c):
Line 896: FbGopPrivate->GraphicsOutput.Mode->Info->PixelsPerScanLine = HorizontalResolution; must be changed to: FbGopPrivate->GraphicsOutput.Mode->Info->PixelsPerScanLine = BytesPerScanLine / (BitsPerPixel / 8); I will submit a separate patch for this. Thanks, - ben > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > art...@aheymans.xyz > Sent: Wednesday, January 24, 2018 6:58 PM > To: edk2-devel@lists.01.org > Cc: Arthur Heymans <art...@aheymans.xyz> > Subject: [edk2] [PATCH] CorebootPayloadPkg: Use correct BytesPerScanLine > > From: Arthur Heymans <art...@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 <art...@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 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel