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>
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>
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>
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>
The functionality of these new high-level functions as implemented here
follows what Weston 11.0's ad hoc EDID parser extracted. There are
differences to Weston though:
- get_model() falls back to the numeric model field
- unusual characters are escaped as hex rather than replaced with dash
The documentation of the new functions allows to change the behavior of
get_model and get_make to e.g. convert PNP ID to a company name. The
notes about UTF-8 allow us to make use of UTF-8 fields if such appear
useful in the future.
Weston's ad hoc parser shall be replaced with this. After another API
addition, the high-level API semantics will match what Weston expects.
The memory_stream stuff is for convenience and will see more complex
use in the future.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This was used as an example of what a high-level API function would
look like, but is too opinionated to be useful across many
compositors.
Signed-off-by: Simon Ser <contact@emersion.fr>