Re: [edk2-devel] [edk2-platforms Patch 3/3] OptionRomPkg: Remove all UGA support

2022-03-10 Thread Ni, Ray
Can you avoid changing the spaces?

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Guomin Jiang
Sent: Friday, March 11, 2022 9:01 AM
To: devel@edk2.groups.io
Cc: Ni, Ray 
Subject: [edk2-devel] [edk2-platforms Patch 3/3] OptionRomPkg: Remove all UGA 
support

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove all UGA support

Cc: Ray Ni 
Signed-off-by: Guomin Jiang 
---
 .../CirrusLogic5430Dxe/CirrusLogic5430.c  | 522 +++---
 .../CirrusLogic5430Dxe/CirrusLogic5430.h  | 136 ++---
 .../CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf |   9 +-
 .../CirrusLogic5430UgaDraw.c  | 412 --
 Drivers/OptionRomPkg/OptionRomPkg.dec |   3 -
 5 files changed, 271 insertions(+), 811 deletions(-)
 delete mode 100644 
Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430UgaDraw.c

diff --git a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c 
b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c
index 4e7830ea94b3..a2f2c2ff60f4 100644
--- a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c
+++ b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c
@@ -11,7 +11,7 @@
   documentation on UGA for details on how to write a UGA driver that is able
   to function both in the EFI pre-boot environment and from the OS runtime.
 
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+  Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -21,7 +21,7 @@
 //
 #include "CirrusLogic5430.h"
 
-EFI_DRIVER_BINDING_PROTOCOL gCirrusLogic5430DriverBinding = {
+EFI_DRIVER_BINDING_PROTOCOL  gCirrusLogic5430DriverBinding = {
   CirrusLogic5430ControllerDriverSupported,
   CirrusLogic5430ControllerDriverStart,
   CirrusLogic5430ControllerDriverStop,
@@ -42,21 +42,21 @@ UINT8  AttributeController[21] = {
 ///
 /// Generic Graphics Controller Register Settings
 ///
-UINT8 GraphicsController[9] = {
+UINT8  GraphicsController[9] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F, 0xFF
 };
 
 //
 // 640 x 480 x 256 color @ 60 Hertz
 //
-UINT8 Crtc_640_480_256_60[28] = {
+UINT8  Crtc_640_480_256_60[28] = {
   0x5d, 0x4f, 0x50, 0x82, 0x53, 0x9f, 0x00, 0x3e,
   0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xe1, 0x83, 0xdf, 0x50, 0x00, 0xe7, 0x04, 0xe3,
   0xff, 0x00, 0x00, 0x22
 };
 
-UINT16 Seq_640_480_256_60[15] = {
+UINT16  Seq_640_480_256_60[15] = {
   0x0100, 0x0101, 0x0f02, 0x0003, 0x0e04, 0x1107, 0x0008, 0x4a0b,
   0x5b0c, 0x450d, 0x7e0e, 0x2b1b, 0x2f1c, 0x301d, 0x331e
 };
@@ -64,14 +64,14 @@ UINT16 Seq_640_480_256_60[15] = {
 //
 // 800 x 600 x 256 color @ 60 Hertz
 //
-UINT8 Crtc_800_600_256_60[28] = {
+UINT8  Crtc_800_600_256_60[28] = {
   0x7F, 0x63, 0x64, 0x80, 0x6B, 0x1B, 0x72, 0xF0,
   0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x58, 0x8C, 0x57, 0x64, 0x00, 0x5F, 0x91, 0xE3,
   0xFF, 0x00, 0x00, 0x22
 };
 
-UINT16 Seq_800_600_256_60[15] = {
+UINT16  Seq_800_600_256_60[15] = {
   0x0100, 0x0101, 0x0f02, 0x0003, 0x0e04, 0x1107, 0x0008, 0x4a0b,
   0x5b0c, 0x450d, 0x510e, 0x2b1b, 0x2f1c, 0x301d, 0x3a1e
 };
@@ -79,14 +79,14 @@ UINT16 Seq_800_600_256_60[15] = {
 //
 // 1024 x 768 x 256 color @ 60 Hertz
 //
-UINT8 Crtc_1024_768_256_60[28] = {
+UINT8  Crtc_1024_768_256_60[28] = {
   0xA3, 0x7F, 0x80, 0x86, 0x85, 0x96, 0x24, 0xFD,
   0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x02, 0x88, 0xFF, 0x80, 0x00, 0x00, 0x24, 0xE3,
   0xFF, 0x4A, 0x00, 0x22
 };
 
-UINT16 Seq_1024_768_256_60[15] = {
+UINT16  Seq_1024_768_256_60[15] = {
   0x0100, 0x0101, 0x0f02, 0x0003, 0x0e04, 0x1107, 0x0008, 0x4a0b,
   0x5b0c, 0x450d, 0x760e, 0x2b1b, 0x2f1c, 0x301d, 0x341e
 };
@@ -95,12 +95,11 @@ UINT16 Seq_1024_768_256_60[15] = {
 /// Table of supported video modes
 ///
 CIRRUS_LOGIC_5430_VIDEO_MODES  CirrusLogic5430VideoModes[] = {
-  {  640, 480, 8, 60, Crtc_640_480_256_60,  Seq_640_480_256_60,  0xe3 },
-  {  800, 600, 8, 60, Crtc_800_600_256_60,  Seq_800_600_256_60,  0xef },
+  { 640,  480, 8, 60, Crtc_640_480_256_60,  Seq_640_480_256_60,  0xe3 },
+  { 800,  600, 8, 60, Crtc_800_600_256_60,  Seq_800_600_256_60,  0xef },
   { 1024, 768, 8, 60, Crtc_1024_768_256_60, Seq_1024_768_256_60, 0xef }
 };
 
-
 /**
   CirrusLogic5430ControllerDriverSupported
 
@@ -111,15 +110,15 @@ CIRRUS_LOGIC_5430_VIDEO_MODES  
CirrusLogic5430VideoModes[] = {
 EFI_STATUS
 EFIAPI
 CirrusLogic5430ControllerDriverSupported (
-  IN EFI_DRIVER_BINDING_PROTOCOL*This,
-  IN EFI_HANDLE Controller,
-  IN EFI_DEVICE_PATH_PROTOCOL   *RemainingDevicePath
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,
+  IN EFI_HANDLE   Controller,
+  IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
   )
 {
-  EFI_STATUS  Status;
-  EFI_PCI_IO_PROTOCOL *PciIo;
-  PCI_TYPE00  Pci;
-  EFI_DEV_PATH*Node;
+  EFI_STATUS   Status;
+  EFI_PCI_IO_PROTOCOL  *PciIo;
+  PCI_TYPE00   Pci;
+  EFI_DEV_PATH

[edk2-devel] [edk2-platforms Patch 3/3] OptionRomPkg: Remove all UGA support

2022-03-10 Thread Guomin Jiang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove all UGA support

Cc: Ray Ni 
Signed-off-by: Guomin Jiang 
---
 .../CirrusLogic5430Dxe/CirrusLogic5430.c  | 522 +++---
 .../CirrusLogic5430Dxe/CirrusLogic5430.h  | 136 ++---
 .../CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf |   9 +-
 .../CirrusLogic5430UgaDraw.c  | 412 --
 Drivers/OptionRomPkg/OptionRomPkg.dec |   3 -
 5 files changed, 271 insertions(+), 811 deletions(-)
 delete mode 100644 
Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430UgaDraw.c

diff --git a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c 
b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c
index 4e7830ea94b3..a2f2c2ff60f4 100644
--- a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c
+++ b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c
@@ -11,7 +11,7 @@
   documentation on UGA for details on how to write a UGA driver that is able
   to function both in the EFI pre-boot environment and from the OS runtime.
 
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+  Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -21,7 +21,7 @@
 //
 #include "CirrusLogic5430.h"
 
-EFI_DRIVER_BINDING_PROTOCOL gCirrusLogic5430DriverBinding = {
+EFI_DRIVER_BINDING_PROTOCOL  gCirrusLogic5430DriverBinding = {
   CirrusLogic5430ControllerDriverSupported,
   CirrusLogic5430ControllerDriverStart,
   CirrusLogic5430ControllerDriverStop,
@@ -42,21 +42,21 @@ UINT8  AttributeController[21] = {
 ///
 /// Generic Graphics Controller Register Settings
 ///
-UINT8 GraphicsController[9] = {
+UINT8  GraphicsController[9] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F, 0xFF
 };
 
 //
 // 640 x 480 x 256 color @ 60 Hertz
 //
-UINT8 Crtc_640_480_256_60[28] = {
+UINT8  Crtc_640_480_256_60[28] = {
   0x5d, 0x4f, 0x50, 0x82, 0x53, 0x9f, 0x00, 0x3e,
   0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xe1, 0x83, 0xdf, 0x50, 0x00, 0xe7, 0x04, 0xe3,
   0xff, 0x00, 0x00, 0x22
 };
 
-UINT16 Seq_640_480_256_60[15] = {
+UINT16  Seq_640_480_256_60[15] = {
   0x0100, 0x0101, 0x0f02, 0x0003, 0x0e04, 0x1107, 0x0008, 0x4a0b,
   0x5b0c, 0x450d, 0x7e0e, 0x2b1b, 0x2f1c, 0x301d, 0x331e
 };
@@ -64,14 +64,14 @@ UINT16 Seq_640_480_256_60[15] = {
 //
 // 800 x 600 x 256 color @ 60 Hertz
 //
-UINT8 Crtc_800_600_256_60[28] = {
+UINT8  Crtc_800_600_256_60[28] = {
   0x7F, 0x63, 0x64, 0x80, 0x6B, 0x1B, 0x72, 0xF0,
   0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x58, 0x8C, 0x57, 0x64, 0x00, 0x5F, 0x91, 0xE3,
   0xFF, 0x00, 0x00, 0x22
 };
 
-UINT16 Seq_800_600_256_60[15] = {
+UINT16  Seq_800_600_256_60[15] = {
   0x0100, 0x0101, 0x0f02, 0x0003, 0x0e04, 0x1107, 0x0008, 0x4a0b,
   0x5b0c, 0x450d, 0x510e, 0x2b1b, 0x2f1c, 0x301d, 0x3a1e
 };
@@ -79,14 +79,14 @@ UINT16 Seq_800_600_256_60[15] = {
 //
 // 1024 x 768 x 256 color @ 60 Hertz
 //
-UINT8 Crtc_1024_768_256_60[28] = {
+UINT8  Crtc_1024_768_256_60[28] = {
   0xA3, 0x7F, 0x80, 0x86, 0x85, 0x96, 0x24, 0xFD,
   0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x02, 0x88, 0xFF, 0x80, 0x00, 0x00, 0x24, 0xE3,
   0xFF, 0x4A, 0x00, 0x22
 };
 
-UINT16 Seq_1024_768_256_60[15] = {
+UINT16  Seq_1024_768_256_60[15] = {
   0x0100, 0x0101, 0x0f02, 0x0003, 0x0e04, 0x1107, 0x0008, 0x4a0b,
   0x5b0c, 0x450d, 0x760e, 0x2b1b, 0x2f1c, 0x301d, 0x341e
 };
@@ -95,12 +95,11 @@ UINT16 Seq_1024_768_256_60[15] = {
 /// Table of supported video modes
 ///
 CIRRUS_LOGIC_5430_VIDEO_MODES  CirrusLogic5430VideoModes[] = {
-  {  640, 480, 8, 60, Crtc_640_480_256_60,  Seq_640_480_256_60,  0xe3 },
-  {  800, 600, 8, 60, Crtc_800_600_256_60,  Seq_800_600_256_60,  0xef },
+  { 640,  480, 8, 60, Crtc_640_480_256_60,  Seq_640_480_256_60,  0xe3 },
+  { 800,  600, 8, 60, Crtc_800_600_256_60,  Seq_800_600_256_60,  0xef },
   { 1024, 768, 8, 60, Crtc_1024_768_256_60, Seq_1024_768_256_60, 0xef }
 };
 
-
 /**
   CirrusLogic5430ControllerDriverSupported
 
@@ -111,15 +110,15 @@ CIRRUS_LOGIC_5430_VIDEO_MODES  
CirrusLogic5430VideoModes[] = {
 EFI_STATUS
 EFIAPI
 CirrusLogic5430ControllerDriverSupported (
-  IN EFI_DRIVER_BINDING_PROTOCOL*This,
-  IN EFI_HANDLE Controller,
-  IN EFI_DEVICE_PATH_PROTOCOL   *RemainingDevicePath
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,
+  IN EFI_HANDLE   Controller,
+  IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
   )
 {
-  EFI_STATUS  Status;
-  EFI_PCI_IO_PROTOCOL *PciIo;
-  PCI_TYPE00  Pci;
-  EFI_DEV_PATH*Node;
+  EFI_STATUS   Status;
+  EFI_PCI_IO_PROTOCOL  *PciIo;
+  PCI_TYPE00   Pci;
+  EFI_DEV_PATH *Node;
 
   //
   // Open the PCI I/O Protocol
@@ -127,7 +126,7 @@ CirrusLogic5430ControllerDriverSupported (
   Status = gBS->OpenProtocol (
   Controller,
   ,
-  (VOID **) ,
+  (VOID **),
   This->DriverBindingHandle,