If the gtf options contain a bad enum di_gtf_ip_param, some variables do
not get initialized to any value but will later be read.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Wayland compositors may be interested in this.
DI-EXT is ignored, because libdisplay-info does not parse it yet.
EDID Color Point Descriptors are ignored, because they have not been
found in shipped products.
https://github.com/linuxhw/EDID.git database contains 373 samples for
which edid-decode complains:
Basic Display Parameters & Features: sRGB is signaled, but the gamma != 2.2.
Therefore I assume that the sRGB flag is more correct when set.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Add a high-level function to get the supported additional signal
colorimetries. This is only an interesting sub-set of the CTA-861-H
defined colorimetries, for driving WCG and HDR displays.
Wayland compositors will be interested in this.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
The low-level struct di_cta_hdr_static_metadata_block is essentially
duplicated in struct di_hdr_static_metadata to make the high-level API
independent of low-level API headers. It's also simpler in form, while
new fields can still be added in the end while maintaining ABI backward
compatibility.
If new sources for HDR static metadata appear, they can be parsed into
this same structure in the future when compatible.
Wayland compositors will be interested in this.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Notifies us if the result ever changes.
The 3 decimal precision is taken from E-EDID 1.4 spec which says that
the numbers have that precision.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Add a high-level function to retrieve color primaries. Wayland
compositors will be interested in this.
A high-level function may later be extended to support stand-alone
DisplayID and other sources.
The high-level data is derived from low-level API calls in
di_info_parse_edid(). As we stash the results in struct di_info to avoid
requiring the callers to explicitly free the high-level structures, this
allows keeping struct di_info deeply const in high-level API
implementation. We also avoid some dynamic allocations.
https://github.com/linuxhw/EDID.git database contains 20399 samples for
which edid-decode complains:
Basic Display Parameters & Features: sRGB is signaled, but the chromaticities do not match.
Therefore I assume that the sRGB flag is more correct when set.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Some EDIDs have DisplayID 2 extension blocks which we don't support
at the moment. Skip the extension block in that case. While at it,
also skip malformed DisplayID blocks.
Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/issues/42
This is also used by type III timings, and there is no other
competing aspect ratio enum in the DisplayID standard.
Signed-off-by: Simon Ser <contact@emersion.fr>
Type II timings are exactly the same as Type I except more tightly
packed and no information on the aspect ratio. As such, they fit neatly
into the Type I and Type VII structure.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Instead of hardcoding the type of timing to DTD let the caller decide.
Also lets the caller set the level of indentation.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
They only have a different resolution for the pixel clock which we can
represent by just using a type in the struct which fits the higher
resolution.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
The speaker allocation format is reused in multiple CTA data blocks.
This commit pulls it into its own struct so it can be embedded into
other data block structs.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>