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>
By default, UBSan prints the error to stderr and does nothing else.
Halt the program so that CI fails and we notice the mistake.
Signed-off-by: Simon Ser <contact@emersion.fr>
Dumps the content of every I2C address which might contain an EDID or
DisplayID blob for every connector which has an I2C bus.
This can be useful to discover DisplayID blobs which are not nested
inside an EDID blob.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Fixes build error
../displayid.c:377:10: error: ‘ssize_t’ undeclared (first use in this function); did you mean ‘size_t’?
seen with:
arc-linux-gcc.br_real (Buildroot 2021.11-4428-g6b6741b) 10.2.0
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Since eed3e1e0f8 ("test: remove edid-decode as a test
dependency"), edid-decode is no longer required to run the test
suite. It's only required to re-generate the test data.
Expand a bit on how to setup edid-decode to re-generate the test
data.
Signed-off-by: Simon Ser <contact@emersion.fr>
Merge the stage into "Build and test". The next stages don't depend
on this stage, so we can parallelize, no need to block the next
stages because of the testing-check step.
Signed-off-by: Simon Ser <contact@emersion.fr>
by storing the reference edid-decode output in the repository. It is now
only a dependency for the gen-test-data target. The CI checks that the
reference output in the repository matches the one generated from a
specific checkout of edid-decode.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>