summaryrefslogtreecommitdiff
path: root/Platform/RaspberryPi/Drivers/DisplayDxe
AgeCommit message (Collapse)AuthorFilesLines
2024-09-16Update code to be more C11 compliant by using __func__Rebecca Cran1-5/+5
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout edk2-platforms. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2020-08-27Platforms/RaspberryPi: Fix build error in DisplayDxeSamer El-Haj-Mahmoud1-1/+1
Commit 0c2af04985f0bf152ac3edc70d9c6d9fe884cdcb added mDriverBinding extern module global, but did not remove the STATIC declaration, which caused the build to break. Fix the build error by removing STATIC for that module global variable. Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com> Reviewed-by: Pete Batard <pete@akeo.ie> Reviewed-by: Andrei Warkentin <andrey.warkentin@gmail.com>
2020-08-17Platforms/RaspberryPi: Fix DisplayDxe ComponentName2 error checkingSamer El-Haj-Mahmoud2-0/+24
Fix input param error checking for the DisplayDxe ComponentName2 protocol. This fixes https://github.com/pftf/RPi4/issues/84 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com> Reviewed-by: Pete Batard <pete@akeo.ie>
2020-08-13Platforms/RaspberryPi: Fix GOP FrameBufferSize returned by SetMode()Samer El-Haj-Mahmoud1-1/+2
GOP SetMode() returns the frame buffer size in FrameBufferSize. The value is obtained from the RPi mailbox call to AllocateBuffer (tag RPI_MBOX_ALLOC_FB), which for a native resolution of 1920 x 1080 returns 8355840 bytes. The size should be 1920 x 1080 x 4 (bytes/pixel), or 8294400 bytes, as defined by the UEFI Spec: "FrameBufferSize : Amount of frame buffer needed to support the active mode as defined by PixelsPerScanLine x VerticalResolution x PixelElementSize". This change forces the returned FrameBufferSize to match the value required by UEFI Spec. The actual buffer allocted by the VPU is larger due to the alignment request when calling RPI_MBOX_ALLOC_FB (32 bytes). A vertical resolution of 1080 aligns to 1088 on 32-bytes, resulting in the increased buffer size (1920 x 1088 x 4 = 8355840). This fixes the SetMode_Conf failure reported by SCT tests at https://github.com/pftf/RPi4/issues/73 Cc: Leif Lindholm <leif@nuviainc.com> Cc: Pete Batard <pete@akeo.ie> Cc: Andrei Warkentin <awarkentin@vmware.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com> Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>
2020-08-13Platforms/RaspberryPi: Return GOP PixelInformation in QueryMode()Samer El-Haj-Mahmoud1-0/+4
Return correct values of PixelInformation in QueryMode(). This fixes the QueryMode_Func failures reported by SCT tests at https://github.com/pftf/RPi4/issues/73 Cc: Leif Lindholm <leif@nuviainc.com> Cc: Pete Batard <pete@akeo.ie> Cc: Andrei Warkentin <awarkentin@vmware.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com> Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>
2020-08-13Platforms/RaspberryPi: Fix GOP parameter handlingSamer El-Haj-Mahmoud1-3/+12
Handle incorrect parameters passed to DisplayDxe GOP functions QueryMode(), SetMode(), and Blt(). This fixes Blt_Conf and QueryMode_Conf failures reported by SCT tests at: https://github.com/pftf/RPi4/issues/73 Cc: Leif Lindholm <leif@nuviainc.com> Cc: Pete Batard <pete@akeo.ie> Cc: Andrei Warkentin <awarkentin@vmware.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com> Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>
2020-08-03Platforms/RaspberryPi: Switch to PcdSet##SPete Batard1-3/+5
According to the bug: https://bugzilla.tianocore.org/show_bug.cgi?id=2777 the deprecated code under DISABLE_NEW_DEPRECATED_INTERFACES will be removed, which will result in compilation breakage of the Raspberry Pi platforms. Prevent that by switching to the different PcdSet API. Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2019-10-21Platforms/RPi3: Restructure platform in preparation for Pi 4Pete Batard5-0/+1326
In preparation for adding Raspberry Pi 4 support, the Pi 3 platform is restructured by factorizing all the drivers and libraries that are going to be commonly used by the two platforms. Because much of the Pi 4 SoC is an extension of the Pi 3 one this means that almost everything, except the ACPI tables, is moved up into a new common RaspberryPi/ subdirectory that will serve both platforms. The .dec is also moved to this directory, under a new RaspberryPi.dec name, and existing references to it are updated. This commit requires the edk2-non-osi in use to contain commit 243e55f622ea in order to build. Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>