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.126, mailfrom: hao.a.wu@intel.com) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Tue, 24 Sep 2019 21:44:51 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2019 21:44:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,546,1559545200"; d="scan'208";a="213922777" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 24 Sep 2019 21:44:50 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 24 Sep 2019 21:44:50 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.32]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.89]) with mapi id 14.03.0439.000; Wed, 25 Sep 2019 12:44:48 +0800 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Gao, Zhichao" , "Ni, Ray" CC: Gris87 Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Add missing sourceX for Blt Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg: Add missing sourceX for Blt Thread-Index: AQHVbMAcKY4Xt1+wRkaeHbSLcvxk8qcuQvkAgACocwCADPLa4A== Date: Wed, 25 Sep 2019 04:44:48 +0000 Message-ID: References: <583ec11aa07d5f93113237da627d058c5672c322.1568643322.git.Gris87@yandex.ru> <734D49CCEBEEF84792F5B80ED585239D5C2E1CC7@SHSMSX104.ccr.corp.intel.com> <3CE959C139B4C44DBEA1810E3AA6F9000B83AE7E@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <3CE959C139B4C44DBEA1810E3AA6F9000B83AE7E@SHSMSX101.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Gao, Zhichao > Sent: Tuesday, September 17, 2019 3:00 PM > To: Ni, Ray > Cc: Gris87; devel@edk2.groups.io > Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Add missing sourceX for > Blt >=20 > 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_OU= TPUT_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_OU= TPUT_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= ) of the > logo.bmp. >=20 > Tested-by: Zhichao Gao > Reviewed-by: Zhichao Gao The patch has been pushed via commit 96301aadc1. Best Regards, Hao Wu >=20 > > -----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 > > > > + Zhichao for review. > > > > > -----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 rectangl= e. > > > > > > 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 > PixelBlueGreenRedReserved8BitPerColor) > > { > > > - Source =3D (UINT8 *) BltBuffer + (SrcY * Delta); > > > + Source =3D (UINT8 *) BltBuffer + (SrcY * Delta) + SourceX * s= izeof > > (EFI_GRAPHICS_OUTPUT_BLT_PIXEL); > > > } else { > > > for (IndexX =3D 0; IndexX < Width; IndexX++) { > > > Blt =3D > > > -- > > > 2.19.1 >=20 >=20 >=20