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.20; helo=mga02.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 5604821E0BA09 for ; Thu, 1 Feb 2018 19:01:11 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2018 19:06:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,445,1511856000"; d="scan'208";a="31365507" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 01 Feb 2018 19:06:48 -0800 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 1 Feb 2018 19:06:48 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 1 Feb 2018 19:06:47 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.145]) with mapi id 14.03.0319.002; Fri, 2 Feb 2018 11:06:46 +0800 From: "Ni, Ruiyu" To: "You, Benjamin" , "edk2-devel@lists.01.org" CC: "Agyeman, Prince" Thread-Topic: [edk2] [PATCH] CorebootPayloadPkg/FbGop: Produces correct PixelsPerScanLine Thread-Index: AQHTmaXVBUcscUwvpkaOpkalnk2/rqOQcixg Date: Fri, 2 Feb 2018 03:06:45 +0000 Deferred-Delivery: Fri, 2 Feb 2018 03:06:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BB744FC@SHSMSX104.ccr.corp.intel.com> References: <20180130083845.29616-1-benjamin.you@intel.com> In-Reply-To: <20180130083845.29616-1-benjamin.you@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] CorebootPayloadPkg/FbGop: Produces correct PixelsPerScanLine 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: Fri, 02 Feb 2018 03:01:11 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Benjamin You > Sent: Tuesday, January 30, 2018 4:39 PM > To: edk2-devel@lists.01.org > Cc: Agyeman, Prince > Subject: [edk2] [PATCH] CorebootPayloadPkg/FbGop: Produces correct > PixelsPerScanLine >=20 > According to UEFI Spec, EFI_GRAPHICS_OUTPUT_PROTOCOL.Mode->Info-> > PixelsPerScanLine may contain padding pixel elements outside the area cov= ered > by HorizontalResolution for performance reasons or due to hardware > restrictions. CorebootPayloadPkg's FbGop driver doesn't follow this requi= rement, > and produces PixelsPerScanLine simply as HorizontalResolution. This needs= to be > fixed to reflect the real length of a framebuffer scanline. >=20 > Cc: Maurice Ma > Cc: Prince Agyeman > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Benjamin You > --- > CorebootPayloadPkg/FbGop/FbGop.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/CorebootPayloadPkg/FbGop/FbGop.c > b/CorebootPayloadPkg/FbGop/FbGop.c > index 6790617033..ecafc95ae3 100644 > --- a/CorebootPayloadPkg/FbGop/FbGop.c > +++ b/CorebootPayloadPkg/FbGop/FbGop.c > @@ -893,7 +893,7 @@ FbGopCheckForVbe ( > FbGopPrivate->GraphicsOutput.Mode->Info->VerticalResolution =3D > VerticalResolution; > FbGopPrivate->GraphicsOutput.Mode->Info->PixelFormat =3D > CurrentModeData->PixelFormat; > CopyMem (&(FbGopPrivate->GraphicsOutput.Mode->Info->PixelInformation), > &mPixelBitMask, sizeof (EFI_PIXEL_BITMASK)); > - FbGopPrivate->GraphicsOutput.Mode->Info->PixelsPerScanLine =3D > HorizontalResolution; > + FbGopPrivate->GraphicsOutput.Mode->Info->PixelsPerScanLine =3D > + (UINT32)(BytesPerScanLine * 8 / BitsPerPixel); > FbGopPrivate->GraphicsOutput.Mode->SizeOfInfo =3D > sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION); > FbGopPrivate->GraphicsOutput.Mode->FrameBufferBase =3D > (EFI_PHYSICAL_ADDRESS) (UINTN) CurrentModeData->LinearFrameBuffer; > FbGopPrivate->GraphicsOutput.Mode->FrameBufferSize =3D CurrentModeDat= a- > >FrameBufferSize; > -- > 2.14.3.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel