[PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow Microsoft Recommendations


Sheng Lean Tan
 

Reminder for review, thanks.

 

From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Sheng Lean Tan via groups.io <sheng.tan@...>
Date: Monday, 3. October 2022 at 11:22
To: devel@edk2.groups.io <devel@edk2.groups.io>, sean@... <sean@...>
Cc: Sean Rhodes <sean@...>, Zhichao Gao <zhichao.gao@...>, Ray Ni <ray.ni@...>, Jian J Wang <jian.j.wang@...>, Liming Gao <gaoliming@...>, Dong, Guo <guo.dong@...>, Guo, Gua <gua.guo@...>
Subject: Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow Microsoft Recommendations

Hi Liming,

Mind to help to take a look at these 2 patches? Sean has updated the initial patches per your recommendation:

https://edk2.groups.io/g/devel/message/94318?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Cboot+logo+sean%2C20%2C2%2C0%2C93922542

 

https://edk2.groups.io/g/devel/message/94320?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Cboot+logo+sean%2C20%2C2%2C0%2C93922544

 

Previous feedback:

https://edk2.groups.io/g/devel/message/92385?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Cboot+logo+sean%2C20%2C2%2C0%2C92974182

 

https://edk2.groups.io/g/devel/message/92146?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Cboot+logo+sean%2C20%2C2%2C0%2C92830014

 

Thanks,

Sheng

 

From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Sean Rhodes <sean@...>
Date: Monday, 26. September 2022 at 10:10
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Sean Rhodes <sean@...>, Zhichao Gao <zhichao.gao@...>, Ray Ni <ray.ni@...>, Jian J Wang <jian.j.wang@...>, Liming Gao <gaoliming@...>
Subject: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow Microsoft Recommendations

Add an option to position the logo 38.2% from the top of the screen,
which follows the recommendations from Microsoft. These can be found
here:
https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/boot-screen-components

Cc: Zhichao Gao <zhichao.gao@...>
Cc: Ray Ni <ray.ni@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Liming Gao <gaoliming@...>
Signed-off-by: Sean Rhodes <sean@...>
---
 MdeModulePkg/Include/Protocol/PlatformLogo.h   | 3 ++-
 MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Include/Protocol/PlatformLogo.h b/MdeModulePkg/Include/Protocol/PlatformLogo.h
index 08e1dc35a4..b24d7d5b79 100644
--- a/MdeModulePkg/Include/Protocol/PlatformLogo.h
+++ b/MdeModulePkg/Include/Protocol/PlatformLogo.h
@@ -29,7 +29,8 @@ typedef enum {
   EdkiiPlatformLogoDisplayAttributeCenterBottom,

   EdkiiPlatformLogoDisplayAttributeLeftBottom,

   EdkiiPlatformLogoDisplayAttributeCenterLeft,

-  EdkiiPlatformLogoDisplayAttributeCenter

+  EdkiiPlatformLogoDisplayAttributeCenter,

+  EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended

 } EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE;

 

 /**

diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
index 478ec2d40e..9065e5281b 100644
--- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
+++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
@@ -169,7 +169,6 @@ BootLogoEnableLogo (
         DestX = SizeOfX - Image.Width;

         DestY = 0;

         break;

-

       case EdkiiPlatformLogoDisplayAttributeCenterLeft:

         DestX = 0;

         DestY = (SizeOfY - Image.Height) / 2;

@@ -182,7 +181,6 @@ BootLogoEnableLogo (
         DestX = SizeOfX - Image.Width;

         DestY = (SizeOfY - Image.Height) / 2;

         break;

-

       case EdkiiPlatformLogoDisplayAttributeLeftBottom:

         DestX = 0;

         DestY = SizeOfY - Image.Height;

@@ -195,7 +193,10 @@ BootLogoEnableLogo (
         DestX = SizeOfX - Image.Width;

         DestY = SizeOfY - Image.Height;

         break;

-

+      case EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended:

+        DestX = (SizeOfX - Image.Width) / 2;

+        DestY = (SizeOfY * 382) / 1000 - Image.Height / 2;

+        break;

       default:

         ASSERT (FALSE);

         continue;

--
2.34.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#94318): https://edk2.groups.io/g/devel/message/94318
Mute This Topic: https://groups.io/mt/93922542/6757431
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [sheng.tan@...]
-=-=-=-=-=-=



Sheng Lean Tan
 

Hi Liming,

Mind to help to take a look at these 2 patches? Sean has updated the initial patches per your recommendation:

https://edk2.groups.io/g/devel/message/94318?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Cboot+logo+sean%2C20%2C2%2C0%2C93922542

 

https://edk2.groups.io/g/devel/message/94320?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Cboot+logo+sean%2C20%2C2%2C0%2C93922544

 

Previous feedback:

https://edk2.groups.io/g/devel/message/92385?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Cboot+logo+sean%2C20%2C2%2C0%2C92974182

 

https://edk2.groups.io/g/devel/message/92146?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2Cboot+logo+sean%2C20%2C2%2C0%2C92830014

 

Thanks,

Sheng

 

From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Sean Rhodes <sean@...>
Date: Monday, 26. September 2022 at 10:10
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Sean Rhodes <sean@...>, Zhichao Gao <zhichao.gao@...>, Ray Ni <ray.ni@...>, Jian J Wang <jian.j.wang@...>, Liming Gao <gaoliming@...>
Subject: [edk2-devel] [PATCH 1/3] MdeModulePkg/BootLogoLib: Add option to follow Microsoft Recommendations

Add an option to position the logo 38.2% from the top of the screen,
which follows the recommendations from Microsoft. These can be found
here:
https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/boot-screen-components

Cc: Zhichao Gao <zhichao.gao@...>
Cc: Ray Ni <ray.ni@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Liming Gao <gaoliming@...>
Signed-off-by: Sean Rhodes <sean@...>
---
 MdeModulePkg/Include/Protocol/PlatformLogo.h   | 3 ++-
 MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Include/Protocol/PlatformLogo.h b/MdeModulePkg/Include/Protocol/PlatformLogo.h
index 08e1dc35a4..b24d7d5b79 100644
--- a/MdeModulePkg/Include/Protocol/PlatformLogo.h
+++ b/MdeModulePkg/Include/Protocol/PlatformLogo.h
@@ -29,7 +29,8 @@ typedef enum {
   EdkiiPlatformLogoDisplayAttributeCenterBottom,

   EdkiiPlatformLogoDisplayAttributeLeftBottom,

   EdkiiPlatformLogoDisplayAttributeCenterLeft,

-  EdkiiPlatformLogoDisplayAttributeCenter

+  EdkiiPlatformLogoDisplayAttributeCenter,

+  EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended

 } EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE;

 

 /**

diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
index 478ec2d40e..9065e5281b 100644
--- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
+++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
@@ -169,7 +169,6 @@ BootLogoEnableLogo (
         DestX = SizeOfX - Image.Width;

         DestY = 0;

         break;

-

       case EdkiiPlatformLogoDisplayAttributeCenterLeft:

         DestX = 0;

         DestY = (SizeOfY - Image.Height) / 2;

@@ -182,7 +181,6 @@ BootLogoEnableLogo (
         DestX = SizeOfX - Image.Width;

         DestY = (SizeOfY - Image.Height) / 2;

         break;

-

       case EdkiiPlatformLogoDisplayAttributeLeftBottom:

         DestX = 0;

         DestY = SizeOfY - Image.Height;

@@ -195,7 +193,10 @@ BootLogoEnableLogo (
         DestX = SizeOfX - Image.Width;

         DestY = SizeOfY - Image.Height;

         break;

-

+      case EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended:

+        DestX = (SizeOfX - Image.Width) / 2;

+        DestY = (SizeOfY * 382) / 1000 - Image.Height / 2;

+        break;

       default:

         ASSERT (FALSE);

         continue;

--
2.34.1



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#94318): https://edk2.groups.io/g/devel/message/94318
Mute This Topic: https://groups.io/mt/93922542/6757431
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [sheng.tan@...]
-=-=-=-=-=-=


Sean Rhodes
 

Add an option to position the logo 38.2% from the top of the screen,
which follows the recommendations from Microsoft. These can be found
here:
https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/boot-scre=
en-components

Cc: Zhichao Gao <zhichao.gao@...>
Cc: Ray Ni <ray.ni@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Liming Gao <gaoliming@...>
Signed-off-by: Sean Rhodes <sean@...>
---
MdeModulePkg/Include/Protocol/PlatformLogo.h | 3 ++-
MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 7 ++++---
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Include/Protocol/PlatformLogo.h b/MdeModulePkg/In=
clude/Protocol/PlatformLogo.h
index 08e1dc35a4..b24d7d5b79 100644
--- a/MdeModulePkg/Include/Protocol/PlatformLogo.h
+++ b/MdeModulePkg/Include/Protocol/PlatformLogo.h
@@ -29,7 +29,8 @@ typedef enum {
EdkiiPlatformLogoDisplayAttributeCenterBottom,=0D
EdkiiPlatformLogoDisplayAttributeLeftBottom,=0D
EdkiiPlatformLogoDisplayAttributeCenterLeft,=0D
- EdkiiPlatformLogoDisplayAttributeCenter=0D
+ EdkiiPlatformLogoDisplayAttributeCenter,=0D
+ EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended=0D
} EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE;=0D
=0D
/**=0D
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c b/MdeModulePkg/=
Library/BootLogoLib/BootLogoLib.c
index 478ec2d40e..9065e5281b 100644
--- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
+++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
@@ -169,7 +169,6 @@ BootLogoEnableLogo (
DestX =3D SizeOfX - Image.Width;=0D
DestY =3D 0;=0D
break;=0D
-=0D
case EdkiiPlatformLogoDisplayAttributeCenterLeft:=0D
DestX =3D 0;=0D
DestY =3D (SizeOfY - Image.Height) / 2;=0D
@@ -182,7 +181,6 @@ BootLogoEnableLogo (
DestX =3D SizeOfX - Image.Width;=0D
DestY =3D (SizeOfY - Image.Height) / 2;=0D
break;=0D
-=0D
case EdkiiPlatformLogoDisplayAttributeLeftBottom:=0D
DestX =3D 0;=0D
DestY =3D SizeOfY - Image.Height;=0D
@@ -195,7 +193,10 @@ BootLogoEnableLogo (
DestX =3D SizeOfX - Image.Width;=0D
DestY =3D SizeOfY - Image.Height;=0D
break;=0D
-=0D
+ case EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended:=0D
+ DestX =3D (SizeOfX - Image.Width) / 2;=0D
+ DestY =3D (SizeOfY * 382) / 1000 - Image.Height / 2;=0D
+ break;=0D
default:=0D
ASSERT (FALSE);=0D
continue;=0D
--=20
2.34.1