Revision: 14705
http://sourceforge.net/p/edk2/code/14705
Author: oliviermartin
Date: 2013-09-23 09:42:53 +0000 (Mon, 23 Sep 2013)
Log Message:
-----------
LcdGraphicsOutputDxe: Update FrameBufferSize as per UEFI spec section 11.9
The shift by 1 on the left was expected. It eases the access to CSSELR and
set/way operations
where the cache level field is at the BIT1 position.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <[email protected]>
Modified Paths:
--------------
trunk/edk2/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c
Modified:
trunk/edk2/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c
===================================================================
---
trunk/edk2/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c
2013-09-23 09:42:05 UTC (rev 14704)
+++
trunk/edk2/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c
2013-09-23 09:42:53 UTC (rev 14705)
@@ -133,7 +133,6 @@
// Setup all the relevant mode information
Instance->Gop.Mode->SizeOfInfo =
sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
Instance->Gop.Mode->FrameBufferBase = VramBaseAddress;
- Instance->Gop.Mode->FrameBufferSize = VramSize;
// Set the flag before changing the mode, to avoid infinite loops
mDisplayInitialized = TRUE;
@@ -297,7 +296,8 @@
{
EFI_STATUS Status = EFI_SUCCESS;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL FillColour;
- LCD_INSTANCE* Instance;
+ LCD_INSTANCE* Instance;
+ LCD_BPP Bpp;
Instance = LCD_INSTANCE_FROM_GOP_THIS (This);
@@ -326,6 +326,14 @@
// Update the UEFI mode information
This->Mode->Mode = ModeNumber;
LcdPlatformQueryMode (ModeNumber,&Instance->ModeInfo);
+ Status = LcdPlatformGetBpp(ModeNumber, &Bpp);
+ if (EFI_ERROR(Status)) {
+ DEBUG ((DEBUG_ERROR, "LcdGraphicsSetMode: ERROR - Couldn't get bytes
per pixel, status: %r\n", Status));
+ goto EXIT;
+ }
+ This->Mode->FrameBufferSize = Instance->ModeInfo.VerticalResolution
+ * Instance->ModeInfo.PixelsPerScanLine
+ * GetBytesPerPixel(Bpp);
// Set the hardware to the new mode
Status = LcdSetMode (ModeNumber);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits