public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@Intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH 1/3] MdeModulePkg/FrameBufferBltLib: Use UINT32 type for internal data
Date: Tue, 16 Jan 2018 13:24:16 +0800	[thread overview]
Message-ID: <e91cf468-878e-132a-1e73-724fdb233ed2@Intel.com> (raw)
In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B9FC6E6@shsmsx102.ccr.corp.intel.com>

On 1/16/2018 1:19 PM, Zeng, Star wrote:
> Reviewed-by: Star Zeng <star.zeng@intel.com>
> 
> 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 <star.zeng@intel.com>
> Subject: [PATCH 1/3] MdeModulePkg/FrameBufferBltLib: Use UINT32 type for internal data
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> ---
>   .../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.<BR>
> +  Copyright (c) 2007 - 2018, Intel Corporation. All rights
> + reserved.<BR>
>     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 <Library/FrameBufferBltLib.h>
>   
>   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


  parent reply	other threads:[~2018-01-16  5:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15  3:46 [PATCH 0/3] Fix two bugs in FrameBufferBltLib Ruiyu Ni
2018-01-15  3:46 ` [PATCH 1/3] MdeModulePkg/FrameBufferBltLib: Use UINT32 type for internal data Ruiyu Ni
     [not found]   ` <0C09AFA07DD0434D9E2A0C6AEB0483103B9FC6E6@shsmsx102.ccr.corp.intel.com>
2018-01-16  5:24     ` Ni, Ruiyu [this message]
2018-01-15  3:46 ` [PATCH 2/3] MdeModulePkg/FrameBufferBltLib: Fix a bug causing display corrupted Ruiyu Ni
2018-01-16  5:18   ` Zeng, Star
2018-01-15  3:46 ` [PATCH 3/3] MdeModulePkg/FrameBufferBltLib: Fix copying of unaligned memory Ruiyu Ni
2018-01-16  5:18   ` Zeng, Star

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e91cf468-878e-132a-1e73-724fdb233ed2@Intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox