[coreboot-gerrit] Change in coreboot[master]: payloads/tianocore: Add a patch to use the proper BytesPerscanline

Arthur Heymans (Code Review) gerrit at coreboot.org
Wed Jan 24 13:14:12 CET 2018


Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/23403


Change subject: payloads/tianocore: Add a patch to use the proper BytesPerscanline
......................................................................

payloads/tianocore: Add a patch to use the proper BytesPerscanline

This fixes tianocore garbled framebuffer when 'y_resolution * bits_per_pixel /
8' is not equal to 'bytes_per_line'.

Tested on Thinkpad X220 with libgfxinit on 1366x768 displaz.

Change-Id: Ib9eaf692f86d416cd4ec3cc73a8b0aa0a28a38dd
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
A payloads/external/tianocore/patches/07_CorebootPayloadPkg-Use-correct-BytesPerScanLine.patch
1 file changed, 31 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/23403/1

diff --git a/payloads/external/tianocore/patches/07_CorebootPayloadPkg-Use-correct-BytesPerScanLine.patch b/payloads/external/tianocore/patches/07_CorebootPayloadPkg-Use-correct-BytesPerScanLine.patch
new file mode 100644
index 0000000..6370efc
--- /dev/null
+++ b/payloads/external/tianocore/patches/07_CorebootPayloadPkg-Use-correct-BytesPerScanLine.patch
@@ -0,0 +1,31 @@
+From 07dec11fe965e73cfef7df38af70c945b6ff21a2 Mon Sep 17 00:00:00 2001
+From: Arthur Heymans <arthur at aheymans.xyz>
+Date: Wed, 24 Jan 2018 10:07:08 +0100
+Subject: [PATCH] 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 at 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
+

-- 
To view, visit https://review.coreboot.org/23403
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9eaf692f86d416cd4ec3cc73a8b0aa0a28a38dd
Gerrit-Change-Number: 23403
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180124/96162ca6/attachment.html>


More information about the coreboot-gerrit mailing list