X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Omap35xxPkg%2FLcdGraphicsOutputDxe%2FLcdGraphicsOutputDxe.c;h=4364dd71a02b91b0a1e98e0c44b0622d972b5461;hp=bfd9f3be43f05e96b1cba998d47d74843ea86f59;hb=f33d5d68abc02727dc828c1079e72ab65e1d63af;hpb=3402aac7d985bf8a9f9d3c639f3fe93609380513 diff --git a/Omap35xxPkg/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c b/Omap35xxPkg/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c index bfd9f3be43..4364dd71a0 100644 --- a/Omap35xxPkg/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c +++ b/Omap35xxPkg/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c @@ -273,24 +273,24 @@ EFI_STATUS EFIAPI LcdGraphicsQueryMode ( IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, - IN UINT32 ModeNumber, - OUT UINTN *SizeOfInfo, - OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info - ) + IN UINT32 ModeNumber, + OUT UINTN *SizeOfInfo, + OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info + ) { - LCD_INSTANCE *Instance; + LCD_INSTANCE *Instance; - Instance = LCD_INSTANCE_FROM_GOP_THIS(This); + Instance = LCD_INSTANCE_FROM_GOP_THIS(This); if (!mDisplayInitialized) { InitializeDisplay (Instance); } // Error checking - if ( (This == NULL) || (Info == NULL) || (SizeOfInfo == NULL) || (ModeNumber >= This->Mode->MaxMode) ) { - DEBUG((DEBUG_ERROR, "LcdGraphicsQueryMode: ERROR - For mode number %d : Invalid Parameter.\n", ModeNumber )); - return EFI_INVALID_PARAMETER; - } + if ( (This == NULL) || (Info == NULL) || (SizeOfInfo == NULL) || (ModeNumber >= This->Mode->MaxMode) ) { + DEBUG((DEBUG_ERROR, "LcdGraphicsQueryMode: ERROR - For mode number %d : Invalid Parameter.\n", ModeNumber )); + return EFI_INVALID_PARAMETER; + } *Info = AllocateCopyPool(sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION), &Instance->ModeInfo); if (*Info == NULL) { @@ -311,12 +311,12 @@ EFI_STATUS EFIAPI LcdGraphicsSetMode ( IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, - IN UINT32 ModeNumber - ) + IN UINT32 ModeNumber + ) { - LCD_INSTANCE *Instance; + LCD_INSTANCE *Instance; - Instance = LCD_INSTANCE_FROM_GOP_THIS(This); + Instance = LCD_INSTANCE_FROM_GOP_THIS(This); if (ModeNumber >= Instance->Mode.MaxMode) { return EFI_UNSUPPORTED; @@ -350,51 +350,51 @@ LcdGraphicsOutputDxeInitialize ( goto EXIT; } - // Install the Graphics Output Protocol and the Device Path - Status = gBS->InstallMultipleProtocolInterfaces( - &Instance->Handle, - &gEfiGraphicsOutputProtocolGuid, &Instance->Gop, - &gEfiDevicePathProtocolGuid, &Instance->DevicePath, - NULL - ); + // Install the Graphics Output Protocol and the Device Path + Status = gBS->InstallMultipleProtocolInterfaces( + &Instance->Handle, + &gEfiGraphicsOutputProtocolGuid, &Instance->Gop, + &gEfiDevicePathProtocolGuid, &Instance->DevicePath, + NULL + ); - if (EFI_ERROR(Status)) { - DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the protocol. Exit Status=%r\n", Status)); - goto EXIT; - } + if (EFI_ERROR(Status)) { + DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the protocol. Exit Status=%r\n", Status)); + goto EXIT; + } // Register for an ExitBootServicesEvent - // When ExitBootServices starts, this function here will make sure that the graphics driver will shut down properly, - // i.e. it will free up all allocated memory and perform any necessary hardware re-configuration. - /*Status = gBS->CreateEvent ( - EVT_SIGNAL_EXIT_BOOT_SERVICES, - TPL_NOTIFY, - LcdGraphicsExitBootServicesEvent, NULL, - &Instance->ExitBootServicesEvent - ); - - if (EFI_ERROR(Status)) { - DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the ExitBootServicesEvent handler. Exit Status=%r\n", Status)); - goto EXIT_ERROR_UNINSTALL_PROTOCOL; - }*/ - - // To get here, everything must be fine, so just exit - goto EXIT; + // When ExitBootServices starts, this function here will make sure that the graphics driver will shut down properly, + // i.e. it will free up all allocated memory and perform any necessary hardware re-configuration. + /*Status = gBS->CreateEvent ( + EVT_SIGNAL_EXIT_BOOT_SERVICES, + TPL_NOTIFY, + LcdGraphicsExitBootServicesEvent, NULL, + &Instance->ExitBootServicesEvent + ); + + if (EFI_ERROR(Status)) { + DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the ExitBootServicesEvent handler. Exit Status=%r\n", Status)); + goto EXIT_ERROR_UNINSTALL_PROTOCOL; + }*/ + + // To get here, everything must be fine, so just exit + goto EXIT; //EXIT_ERROR_UNINSTALL_PROTOCOL: - /* The following function could return an error message, - * however, to get here something must have gone wrong already, - * so preserve the original error, i.e. don't change - * the Status variable, even it fails to uninstall the protocol. - */ -/* gBS->UninstallMultipleProtocolInterfaces ( - Instance->Handle, - &gEfiGraphicsOutputProtocolGuid, &Instance->Gop, // Uninstall Graphics Output protocol - &gEfiDevicePathProtocolGuid, &Instance->DevicePath, // Uninstall device path - NULL - );*/ + /* The following function could return an error message, + * however, to get here something must have gone wrong already, + * so preserve the original error, i.e. don't change + * the Status variable, even it fails to uninstall the protocol. + */ + /* gBS->UninstallMultipleProtocolInterfaces ( + Instance->Handle, + &gEfiGraphicsOutputProtocolGuid, &Instance->Gop, // Uninstall Graphics Output protocol + &gEfiDevicePathProtocolGuid, &Instance->DevicePath, // Uninstall device path + NULL + );*/ EXIT: - return Status; + return Status; }