From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=benjamin.you@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 63DA22222C229 for ; Mon, 29 Jan 2018 22:09:57 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2018 22:15:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,433,1511856000"; d="scan'208";a="199853302" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 29 Jan 2018 22:15:31 -0800 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 29 Jan 2018 22:15:30 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 29 Jan 2018 22:15:30 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.145]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.192]) with mapi id 14.03.0319.002; Tue, 30 Jan 2018 14:15:28 +0800 From: "You, Benjamin" To: "arthur@aheymans.xyz" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH] CorebootPayloadPkg: Use correct BytesPerScanLine Thread-Index: AQHTlTAYbO9yM5GE4kKb+ZrPyeBPYKOL+OoA Date: Tue, 30 Jan 2018 06:15:29 +0000 Message-ID: References: <20180124105736.14877-1-arthur@aheymans.xyz> In-Reply-To: <20180124105736.14877-1-arthur@aheymans.xyz> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjRlZTI0NTQtOTEzMS00NmI1LTk2ZDUtODQ3MDBiNWM4YjJhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJYWEVDdFJIVEtSZGtpUURqMWZ5NTUwdWpwbCtmUlVkdmU3ZGZWXC9xZjhmcEhmYWJFTDhtaTlmNkNPRzlzZ2tuVyJ9 dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] CorebootPayloadPkg: Use correct BytesPerScanLine X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2018 06:09:57 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Benjamin You > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > arthur@aheymans.xyz > Sent: Wednesday, January 24, 2018 6:58 PM > To: edk2-devel@lists.01.org > Cc: Arthur Heymans > Subject: [edk2] [PATCH] CorebootPayloadPkg: Use correct BytesPerScanLine >=20 > From: Arthur Heymans >=20 > Fetch BytesPerScanLine from coreboot table to reflect how the actual > framebuffer is set up instead of guessing it from the horizontal > resolution. >=20 > This fixes a garbled display when HorizontalResolution * (BitsPerPixel > / 8) and pFbInfo->BytesPerScanLine don't match. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Arthur Heymans >=20 > 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 =3D pFbInfo->BitsPerPixel; > HorizontalResolution =3D pFbInfo->HorizontalResolution; > VerticalResolution =3D pFbInfo->VerticalResolution; > - BytesPerScanLine =3D HorizontalResolution * (BitsPerPixel / 8); > + BytesPerScanLine =3D pFbInfo->BytesPerScanLine; >=20 > ModeBuffer =3D (FB_VIDEO_MODE_DATA *) AllocatePool ( >=20 >=20 > ModeNumber * sizeof > (FB_VIDEO_MODE_DATA) > -- > 2.16.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel