[edk2-devel] [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider SourceX

Marvin Häuser posted 1 patch 3 weeks ago
Failed in applying to current master (apply log)
MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[edk2-devel] [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider SourceX

Posted by Marvin Häuser 3 weeks ago
From: Marvin Haeuser <mhaeuser@outlook.de>

Currently, SourceX is not considered in the BufferToVideo operation
when the 8-bit pixel format is used. Correctly add the resulting
offset to prevent image corruption.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de>
---
 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 47c5326e9958..a084cc81d32e 100644
--- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
+++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
@@ -504,7 +504,7 @@ FrameBufferBltLibBufferToVideo (
     Destination = Configure->FrameBuffer + Offset;

 

     if (Configure->PixelFormat == PixelBlueGreenRedReserved8BitPerColor) {

-      Source = (UINT8 *) BltBuffer + (SrcY * Delta);

+      Source = (UINT8 *) BltBuffer + (SrcY * Delta) + (SourceX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));

     } else {

       for (IndexX = 0; IndexX < Width; IndexX++) {

         Blt =

-- 
2.23.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47970): https://edk2.groups.io/g/devel/message/47970
Mute This Topic: https://groups.io/mt/34275800/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider SourceX

Posted by Wu, Hao A 3 weeks ago
> -----Original Message-----
> From: Marvin Häuser [mailto:Marvin.Haeuser@outlook.com]
> Sent: Tuesday, September 24, 2019 8:46 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J; Wu, Hao A
> Subject: [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider
> SourceX
> 
> From: Marvin Haeuser <mhaeuser@outlook.de>
> 
> Currently, SourceX is not considered in the BufferToVideo operation
> when the 8-bit pixel format is used. Correctly add the resulting
> offset to prevent image corruption.
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>


Hello Marvin,

In the future, could you help to run the below script:
BaseTools/Scripts/GetMaintainer.py
to get the reviewers for the proposed patch? Thanks in advance.

Hello Zhichao and Ray,

Could you help to take a look at this patch? Thanks.

Best Regards,
Hao Wu


> Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de>
> ---
>  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 47c5326e9958..a084cc81d32e 100644
> --- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
> +++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
> @@ -504,7 +504,7 @@ FrameBufferBltLibBufferToVideo (
>      Destination = Configure->FrameBuffer + Offset;
> 
> 
> 
>      if (Configure->PixelFormat == PixelBlueGreenRedReserved8BitPerColor) {
> 
> -      Source = (UINT8 *) BltBuffer + (SrcY * Delta);
> 
> +      Source = (UINT8 *) BltBuffer + (SrcY * Delta) + (SourceX * sizeof
> (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
> 
>      } else {
> 
>        for (IndexX = 0; IndexX < Width; IndexX++) {
> 
>          Blt =
> 
> --
> 2.23.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47941): https://edk2.groups.io/g/devel/message/47941
Mute This Topic: https://groups.io/mt/34275800/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider SourceX

Posted by Gao, Zhichao 3 weeks ago
I have just viewed a same patch of this issue. See https://edk2.groups.io/g/devel/topic/34168097#47297.
The two patches are doing the same thing.

Thanks,
Zhichao

> -----Original Message-----
> From: Wu, Hao A
> Sent: Tuesday, September 24, 2019 9:02 PM
> To: Marvin Häuser <Marvin.Haeuser@outlook.com>; devel@edk2.groups.io;
> Gao, Zhichao <zhichao.gao@intel.com>; Ni, Ray <ray.ni@intel.com>
> Cc: Wang, Jian J <jian.j.wang@intel.com>
> Subject: RE: [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider
> SourceX
> 
> > -----Original Message-----
> > From: Marvin Häuser [mailto:Marvin.Haeuser@outlook.com]
> > Sent: Tuesday, September 24, 2019 8:46 PM
> > To: devel@edk2.groups.io
> > Cc: Wang, Jian J; Wu, Hao A
> > Subject: [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider
> > SourceX
> >
> > From: Marvin Haeuser <mhaeuser@outlook.de>
> >
> > Currently, SourceX is not considered in the BufferToVideo operation
> > when the 8-bit pixel format is used. Correctly add the resulting
> > offset to prevent image corruption.
> >
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Hao A Wu <hao.a.wu@intel.com>
> 
> 
> Hello Marvin,
> 
> In the future, could you help to run the below script:
> BaseTools/Scripts/GetMaintainer.py
> to get the reviewers for the proposed patch? Thanks in advance.
> 
> Hello Zhichao and Ray,
> 
> Could you help to take a look at this patch? Thanks.
> 
> Best Regards,
> Hao Wu
> 
> 
> > Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de>
> > ---
> >  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 47c5326e9958..a084cc81d32e 100644
> > --- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
> > +++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
> > @@ -504,7 +504,7 @@ FrameBufferBltLibBufferToVideo (
> >      Destination = Configure->FrameBuffer + Offset;
> >
> >
> >
> >      if (Configure->PixelFormat ==
> > PixelBlueGreenRedReserved8BitPerColor) {
> >
> > -      Source = (UINT8 *) BltBuffer + (SrcY * Delta);
> >
> > +      Source = (UINT8 *) BltBuffer + (SrcY * Delta) + (SourceX *
> > + sizeof
> > (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
> >
> >      } else {
> >
> >        for (IndexX = 0; IndexX < Width; IndexX++) {
> >
> >          Blt =
> >
> > --
> > 2.23.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47942): https://edk2.groups.io/g/devel/message/47942
Mute This Topic: https://groups.io/mt/34275800/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider SourceX

Posted by Wu, Hao A 3 weeks ago
> -----Original Message-----
> From: Gao, Zhichao
> Sent: Tuesday, September 24, 2019 9:15 PM
> To: Wu, Hao A; Marvin Häuser; devel@edk2.groups.io; Ni, Ray
> Cc: Wang, Jian J
> Subject: RE: [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider
> SourceX
> 
> I have just viewed a same patch of this issue. See
> https://edk2.groups.io/g/devel/topic/34168097#47297.
> The two patches are doing the same thing.


Yes. The 2 patches look the same to me.

Since the above patch has been reviewed and tested, I will push the above one
later if there is no other comments.

Best Regards,
Hao Wu


> 
> Thanks,
> Zhichao
> 
> > -----Original Message-----
> > From: Wu, Hao A
> > Sent: Tuesday, September 24, 2019 9:02 PM
> > To: Marvin Häuser <Marvin.Haeuser@outlook.com>;
> devel@edk2.groups.io;
> > Gao, Zhichao <zhichao.gao@intel.com>; Ni, Ray <ray.ni@intel.com>
> > Cc: Wang, Jian J <jian.j.wang@intel.com>
> > Subject: RE: [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly
> consider
> > SourceX
> >
> > > -----Original Message-----
> > > From: Marvin Häuser [mailto:Marvin.Haeuser@outlook.com]
> > > Sent: Tuesday, September 24, 2019 8:46 PM
> > > To: devel@edk2.groups.io
> > > Cc: Wang, Jian J; Wu, Hao A
> > > Subject: [PATCH] MdeModulePkg/FrameBufferBltLib: Correctly consider
> > > SourceX
> > >
> > > From: Marvin Haeuser <mhaeuser@outlook.de>
> > >
> > > Currently, SourceX is not considered in the BufferToVideo operation
> > > when the 8-bit pixel format is used. Correctly add the resulting
> > > offset to prevent image corruption.
> > >
> > > Cc: Jian J Wang <jian.j.wang@intel.com>
> > > Cc: Hao A Wu <hao.a.wu@intel.com>
> >
> >
> > Hello Marvin,
> >
> > In the future, could you help to run the below script:
> > BaseTools/Scripts/GetMaintainer.py
> > to get the reviewers for the proposed patch? Thanks in advance.
> >
> > Hello Zhichao and Ray,
> >
> > Could you help to take a look at this patch? Thanks.
> >
> > Best Regards,
> > Hao Wu
> >
> >
> > > Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de>
> > > ---
> > >  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 47c5326e9958..a084cc81d32e 100644
> > > --- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
> > > +++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
> > > @@ -504,7 +504,7 @@ FrameBufferBltLibBufferToVideo (
> > >      Destination = Configure->FrameBuffer + Offset;
> > >
> > >
> > >
> > >      if (Configure->PixelFormat ==
> > > PixelBlueGreenRedReserved8BitPerColor) {
> > >
> > > -      Source = (UINT8 *) BltBuffer + (SrcY * Delta);
> > >
> > > +      Source = (UINT8 *) BltBuffer + (SrcY * Delta) + (SourceX *
> > > + sizeof
> > > (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
> > >
> > >      } else {
> > >
> > >        for (IndexX = 0; IndexX < Width; IndexX++) {
> > >
> > >          Blt =
> > >
> > > --
> > > 2.23.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47949): https://edk2.groups.io/g/devel/message/47949
Mute This Topic: https://groups.io/mt/34275800/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-