public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: arthur@aheymans.xyz
To: edk2-devel@lists.01.org
Cc: Arthur Heymans <arthur@aheymans.xyz>
Subject: [PATCH] CorebootPayloadPkg: Use correct BytesPerScanLine
Date: Wed, 24 Jan 2018 11:57:36 +0100	[thread overview]
Message-ID: <20180124105736.14877-1-arthur@aheymans.xyz> (raw)

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



             reply	other threads:[~2018-01-24 10:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 10:57 arthur [this message]
2018-01-25  5:34 ` [PATCH] CorebootPayloadPkg: Use correct BytesPerScanLine 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180124105736.14877-1-arthur@aheymans.xyz \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox