From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 40714221F93B5 for ; Mon, 15 Jan 2018 21:18:59 -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 fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2018 21:24:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,366,1511856000"; d="scan'208";a="195962477" Received: from ray-dev.ccr.corp.intel.com (HELO [10.239.9.19]) ([10.239.9.19]) by fmsmga006.fm.intel.com with ESMTP; 15 Jan 2018 21:24:17 -0800 To: "Zeng, Star" , "edk2-devel@lists.01.org" References: <20180115034612.381104-1-ruiyu.ni@intel.com> <20180115034612.381104-2-ruiyu.ni@intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B9FC6E6@shsmsx102.ccr.corp.intel.com> From: "Ni, Ruiyu" Message-ID: Date: Tue, 16 Jan 2018 13:24:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B9FC6E6@shsmsx102.ccr.corp.intel.com> Subject: Re: [PATCH 1/3] MdeModulePkg/FrameBufferBltLib: Use UINT32 type for internal data 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, 16 Jan 2018 05:18:59 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 1/16/2018 1:19 PM, Zeng, Star wrote: > Reviewed-by: Star Zeng > > The patch also removes the unused ColorDepth field, right? yes. I will mentioned in the commit message body. > > Thanks, > Star > -----Original Message----- > From: Ni, Ruiyu > Sent: Monday, January 15, 2018 11:46 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star > Subject: [PATCH 1/3] MdeModulePkg/FrameBufferBltLib: Use UINT32 type for internal data > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ruiyu Ni > Cc: Star Zeng > --- > .../Library/FrameBufferBltLib/FrameBufferBltLib.c | 21 ++++++++++----------- > 1 file changed, 10 insertions(+), 11 deletions(-) > > diff --git a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > index 011d9c52cd..3078fe6254 100644 > --- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > +++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > @@ -1,7 +1,7 @@ > /** @file > FrameBufferBltLib - Library to perform blt operations on a frame buffer. > > - Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
> + Copyright (c) 2007 - 2018, Intel Corporation. All rights > + reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > which accompanies this distribution. The full text of the license may be found at @@ -21,11 +21,10 @@ #include > > struct FRAME_BUFFER_CONFIGURE { > - UINTN ColorDepth; > - UINTN WidthInBytes; > - UINTN BytesPerPixel; > - UINTN WidthInPixels; > - UINTN Height; > + UINT32 WidthInBytes; > + UINT32 BytesPerPixel; > + UINT32 WidthInPixels; > + UINT32 Height; > UINT8 *FrameBuffer; > EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; > EFI_PIXEL_BITMASK PixelMasks; > @@ -53,7 +52,7 @@ CONST EFI_PIXEL_BITMASK mBgrPixelMasks = { VOID FrameBufferBltLibConfigurePixelFormat ( > IN CONST EFI_PIXEL_BITMASK *BitMask, > - OUT UINTN *BytesPerPixel, > + OUT UINT32 *BytesPerPixel, > OUT INT8 *PixelShl, > OUT INT8 *PixelShr > ) > @@ -84,7 +83,7 @@ FrameBufferBltLibConfigurePixelFormat ( > MergedMasks = (UINT32) (MergedMasks | Masks[3]); > > ASSERT (MergedMasks != 0); > - *BytesPerPixel = (UINTN) ((HighBitSet32 (MergedMasks) + 7) / 8); > + *BytesPerPixel = (UINT32) ((HighBitSet32 (MergedMasks) + 7) / 8); > DEBUG ((DEBUG_INFO, "Bytes per pixel: %d\n", *BytesPerPixel)); } > > @@ -115,7 +114,7 @@ FrameBufferBltConfigure ( > ) > { > CONST EFI_PIXEL_BITMASK *BitMask; > - UINTN BytesPerPixel; > + UINT32 BytesPerPixel; > INT8 PixelShl[4]; > INT8 PixelShr[4]; > > @@ -164,8 +163,8 @@ FrameBufferBltConfigure ( > Configure->BytesPerPixel = BytesPerPixel; > Configure->PixelFormat = FrameBufferInfo->PixelFormat; > Configure->FrameBuffer = (UINT8*) FrameBuffer; > - Configure->WidthInPixels = (UINTN) FrameBufferInfo->HorizontalResolution; > - Configure->Height = (UINTN) FrameBufferInfo->VerticalResolution; > + Configure->WidthInPixels = FrameBufferInfo->HorizontalResolution; > + Configure->Height = FrameBufferInfo->VerticalResolution; > Configure->WidthInBytes = Configure->WidthInPixels * Configure->BytesPerPixel; > > return RETURN_SUCCESS; > -- > 2.15.1.windows.2 > -- Thanks, Ray