From nobody Fri Nov 1 10:24:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517301561822965.4142497966873; Tue, 30 Jan 2018 00:39:21 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6808B2233376D; Tue, 30 Jan 2018 00:33:42 -0800 (PST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 60EEF2215BD80 for ; Tue, 30 Jan 2018 00:33:41 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2018 00:39:15 -0800 Received: from zyou1-mobl.ccr.corp.intel.com ([10.239.158.165]) by orsmga005.jf.intel.com with ESMTP; 30 Jan 2018 00:39:14 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=benjamin.you@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,433,1511856000"; d="scan'208";a="197278163" From: Benjamin You To: edk2-devel@lists.01.org Date: Tue, 30 Jan 2018 16:38:45 +0800 Message-Id: <20180130083845.29616-1-benjamin.you@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [edk2] [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: , Cc: Prince Agyeman MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" According to UEFI Spec, EFI_GRAPHICS_OUTPUT_PROTOCOL.Mode->Info-> PixelsPerScanLine may contain padding pixel elements outside the area covered by HorizontalResolution for performance reasons or due to hardware restrictions. CorebootPayloadPkg's FbGop driver doesn't follow this requirement, and produces PixelsPerScanLine simply as HorizontalResolution. This needs to be fixed to reflect the real length of a framebuffer scanline. Cc: Maurice Ma Cc: Prince Agyeman Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Benjamin You Reviewed-by: Ruiyu Ni --- CorebootPayloadPkg/FbGop/FbGop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CorebootPayloadPkg/FbGop/FbGop.c b/CorebootPayloadPkg/FbGop/Fb= Gop.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 Vertic= alResolution; =20 FbGopPrivate->GraphicsOutput.Mode->Info->PixelFormat =3D CurrentModeData= ->PixelFormat; CopyMem (&(FbGopPrivate->GraphicsOutput.Mode->Info->PixelInformation), &= mPixelBitMask, sizeof (EFI_PIXEL_BITMASK)); =20 - FbGopPrivate->GraphicsOutput.Mode->Info->PixelsPerScanLine =3D Horizonta= lResolution; =20 + FbGopPrivate->GraphicsOutput.Mode->Info->PixelsPerScanLine =3D (UINT32)(= BytesPerScanLine * 8 / BitsPerPixel); FbGopPrivate->GraphicsOutput.Mode->SizeOfInfo =3D sizeof(EFI_GRAPHICS_OU= TPUT_MODE_INFORMATION); FbGopPrivate->GraphicsOutput.Mode->FrameBufferBase =3D (EFI_PHYSICAL_ADD= RESS) (UINTN) CurrentModeData->LinearFrameBuffer; FbGopPrivate->GraphicsOutput.Mode->FrameBufferSize =3D CurrentModeData-= >FrameBufferSize; --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel