From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: zhichao.gao@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Tue, 17 Sep 2019 00:00:02 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2019 00:00:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,515,1559545200"; d="scan'208";a="198597190" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 17 Sep 2019 00:00:00 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Sep 2019 00:00:00 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Sep 2019 00:00:00 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.92]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.89]) with mapi id 14.03.0439.000; Tue, 17 Sep 2019 14:59:58 +0800 From: "Gao, Zhichao" To: "Ni, Ray" CC: Gris87 , "devel@edk2.groups.io" Subject: Re: [PATCH] MdeModulePkg: Add missing sourceX for Blt Thread-Topic: [PATCH] MdeModulePkg: Add missing sourceX for Blt Thread-Index: AQHVbNFLZdR9ABAljk+1W7mhK8CaFacvb2AA Date: Tue, 17 Sep 2019 06:59:58 +0000 Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B83AE7E@SHSMSX101.ccr.corp.intel.com> References: <583ec11aa07d5f93113237da627d058c5672c322.1568643322.git.Gris87@yandex.ru> <734D49CCEBEEF84792F5B80ED585239D5C2E1CC7@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C2E1CC7@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zhichao.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable It is a bug in the blt interface. I have tested it with OvmfPkgX64. Here is the simple test step: 1. Change BootLogoLib.c line 213: Status =3D GraphicsOutput->Blt ( GraphicsOutput, Blt, EfiBltBufferToVideo, 0, 0, (UINTN) DestX, (UINTN) DestY, Image.Width, Image.Height, Image.Width * sizeof (EFI_GRAPHICS_OUTPU= T_BLT_PIXEL) ); =3D=3D> Status =3D GraphicsOutput->Blt ( GraphicsOutput, Blt, EfiBltBufferToVideo, 20, 20, (UINTN) DestX, (UINTN) DestY, Image.Width - 20, Image.Height - 20, Image.Width * sizeof (EFI_GRAPHICS_OUTPU= T_BLT_PIXEL) ); 2. build OvmfpkgX64 image and boot thru Qemu. 3. view the logo. The logo shows incorrect. It should show at the (20, 20), but the result is= (0, 20). Apply this patch, then the result is expected, i.e. it showed at (20, 20) o= f the logo.bmp. Tested-by: Zhichao Gao Reviewed-by: Zhichao Gao > -----Original Message----- > From: Ni, Ray > Sent: Tuesday, September 17, 2019 4:57 AM > To: Gao, Zhichao > Cc: Gris87 ; devel@edk2.groups.io > Subject: RE: [PATCH] MdeModulePkg: Add missing sourceX for Blt >=20 > + Zhichao for review. >=20 > > -----Original Message----- > > From: Gris87 > > Sent: Monday, September 16, 2019 7:22 AM > > To: devel@edk2.groups.io > > Cc: Gris87 ; Ni, Ray > > Subject: [PATCH] MdeModulePkg: Add missing sourceX for Blt > > > > There is no sourceX offset in case when > > Configure->PixelFormat =3D=3D PixelBlueGreenRedReserved8BitPerColor. > > We are copying most left pixels instead of copying required rectangle. > > > > Signed-off-by: Gris87 > > Cc: Ruiyu Ni > > --- > > MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > > b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > > index 47c5326e99..ff7979c962 100644 > > --- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > > +++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > > @@ -504,7 +504,7 @@ FrameBufferBltLibBufferToVideo ( > > Destination =3D Configure->FrameBuffer + Offset; > > > > if (Configure->PixelFormat =3D=3D PixelBlueGreenRedReserved8BitPer= Color) > { > > - Source =3D (UINT8 *) BltBuffer + (SrcY * Delta); > > + Source =3D (UINT8 *) BltBuffer + (SrcY * Delta) + SourceX * size= of > (EFI_GRAPHICS_OUTPUT_BLT_PIXEL); > > } else { > > for (IndexX =3D 0; IndexX < Width; IndexX++) { > > Blt =3D > > -- > > 2.19.1