summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibEDID
AgeCommit message (Collapse)Author
2023-01-02LibEDID: Propagate errors using TRYericLemanissier
2022-12-09Everywhere: Use C++ concepts instead of requires clausesMoustafa Raafat
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-12-03Everywhere: Run clang-formatLinus Groh
2022-11-01Everywhere: Explicitly link all binaries against the LibC targetTim Schumacher
Even though the toolchain implicitly links against -lc, it does not know where it should get LibC from except for the sysroot. In the case of Clang this causes it to pick up the LibC stub instead, which might be slightly outdated and feature missing symbols. This is currently not an issue that manifests because we pass through the dependency on LibC and other libraries by accident, which causes CMake to link against the LibC target (instead of just the library), and thus points the linker at the build output directory. Since we are looking to fix that in the upcoming commits, let's make sure that everything will still be able to find the proper LibC first.
2022-10-04AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most placesNico Weber
Doesn't use them in libc headers so that those don't have to pull in AK/Platform.h. AK_COMPILER_GCC is set _only_ for gcc, not for clang too. (__GNUC__ is defined in clang builds as well.) Using AK_COMPILER_GCC simplifies things some. AK_COMPILER_CLANG isn't as much of a win, other than that it's consistent with AK_COMPILER_GCC.
2022-09-24LibEDID: Remove head index when retrieving an EDID from DisplayConnectorLiav A
We simply don't need that field anymore, as it was used when one FramebufferDevice could contain multiple framebuffers within it, each for a connected screen head.
2022-09-16Everywhere: Remove a bunch of dead write-only variablesTim Schumacher
LLVM 15 now warns (and thus errors) about this, and there is really no point in keeping them.
2022-07-23Kernel+Userland: Rename FB.h => Graphics.hLiav A
This header file represents the entire interface between the kernel and userland, and as such, no longer should be called FB.h but something that represents the whole graphics subsystem.
2022-07-23Userland: Remove stale remainders of old framebuffer devicesLiav A
2022-07-12Everywhere: Split Error::from_string_literal and Error::from_string_viewsin-ack
Error::from_string_literal now takes direct char const*s, while Error::from_string_view does what Error::from_string_literal used to do: taking StringViews. This change will remove the need to insert `sv` after error strings when returning string literal errors once StringView(char const*) is removed. No functional changes.
2022-07-12Everywhere: Explicitly specify the size in StringView constructorssin-ack
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
2022-06-10LibEDID: Return "Unknown" string if failed to determine the manufacturerLiav A
Before of this patch, It happened that the return string could be "@@@", as a result of doing mathematical addition of ASCII '@' with bits when decoding the packed manufacturer ID bytes from the EDID. To avoid this, consider m_legacy_manufacturer_id to be invalid until we successfully decode the packed bytes.
2022-05-05Everywhere: Rename fb prefix function names => graphics_connectorLiav A
2022-05-05Everywhere: Rename FB prefix structure names => GraphicsLiav A
2022-05-05LibEDID: Export common structures into a header fileLiav A
This will be used later in the kernel code to simplify the EDID handling code.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-08LibEDID: Fix DetailedTiming::pixel_clock_khz resultLiav A
The stored value is in units of 10 kHz, which means that to get the value in kHz, we need to multiply it by 10 and not 10000.
2022-02-16LibEDID: Exclude DMT::MonitorTiming::name() from the KernelIdan Horowitz
This API is only used by userland and it uses infallible Strings, so let's just ifdef it out of the Kernel.
2022-02-16LibEDID: Exclude display_product_{name, serial_number} from the KernelIdan Horowitz
These APIs return Strings, which are OOM-infallibe, and as such, not appropriate for Kernel use. Since these APIs are only used by userland at the moment, we can just ifdef them out of the Kernel.
2022-02-16LibEDID: Store manufacturer id instead of allocating on each callIdan Horowitz
This also let's us use a KString instead of a string when we're in the Kernel, which opens the path for OOM-failure propagation.
2022-02-16LibEDID: Store EDID version instead of allocating on each getter callIdan Horowitz
This also let's us use a KString instead of a string when we're in the Kernel, which opens the path for OOM-failure propagation.
2022-01-26LibEDID: Use correct paths for LibEDID generated filesTimothy Flynn
Code generators that generate their files for both Lagom and Serenity have a blob in their CMake file like this: set(TIME_ZONE_DATA_HEADER LibTimeZone/TimeZoneData.h) set(TIME_ZONE_DATA_IMPLEMENTATION LibTimeZone/TimeZoneData.cpp) set(TIME_ZONE_META_TARGET_PREFIX LibTimeZone_) if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibTimeZone") # Serenity build. set(TIME_ZONE_DATA_HEADER TimeZoneData.h) set(TIME_ZONE_DATA_IMPLEMENTATION TimeZoneData.cpp) set(TIME_ZONE_META_TARGET_PREFIX "") endif() LibEDID generates files only for Serenity, but was using the Lagom build version of the _HEADER, _IMPLEMENTATION, and _PREFIX variables. Thus if pnp_ids.cmake was ever touched, the following error would be raised: Userland/Libraries/LibEDID/EDID.cpp:18:18: fatal error: LibEDID/PnpIDs.h: No such file or directory 18 | # include <LibEDID/LibEDID/PnpIDs.h> Use the Serenity paths in pnp_ids.cmake and in the #include within LibEDID itself.
2022-01-24Everywhere: Convert ByteBuffer factory methods from Optional -> ErrorOrSam Atkins
Apologies for the enormous commit, but I don't see a way to split this up nicely. In the vast majority of cases it's a simple change. A few extra places can use TRY instead of manual error checking though. :^)
2022-01-24LibEDID: Fix handling extension mapsTom
We weren't properly iterating the extension blocks and thought we encountered an unexpected extension map block, when we really should have just skipped over it.
2022-01-24LibEDID: Fix calculating height and refresh rate for interlaced modesTom
The vertical values need to be multiplied with 2 for interlaced modes.
2022-01-23Meta+LibEDID: Download and generate the PNP ID databaseTom
This downloads the UEFI's published PNP ID database and generates a lookup table for use in LibEDID. The lookup table isn't optimized at all, but this can be easily done at a later point if needed.
2022-01-23LibEDID: Add API for conveniently querying EDID from framebuffer deviceTom
2022-01-23LibEDID: Add a library to parse EDID blobsTom
This library can be used (for the most part) by kernel drivers as well as user mode. For this reason FixedPoint is used rather than floating point, but kept to a minimum.