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>
This allows callers to access the detailed DMT data.
di-edid-decode is updated to print the missing fields.
Signed-off-by: Simon Ser <contact@emersion.fr>
Report the SVDs inside the video data block.
We'll need to add additional APIs to get detailed SVD mode info
in the future (with a SVD table).
Signed-off-by: Simon Ser <contact@emersion.fr>
Nested structs makes it impossible to extend the nested struct after
extending the base struct. The union acts as a single struct in this
case but the nesting is still an issue. Use pointers to those structs instead
to keep all of them extensible. Only the struct which is applicable for the
signal type is not a null pointer to make sure only valid data is accessed.
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
This is a private function which parses DTDs. This will be useful
in the next commit to parse DTDs from the CTA extension.
Signed-off-by: Simon Ser <contact@emersion.fr>
This is a bit messy because the values depend on various misc flags
defined earlier in the spec, and the meaning changes between EDID 1.3
and 1.4. On top of that edid-decode prints something confusing in the
EDID 1.3 case.
Signed-off-by: Simon Ser <contact@emersion.fr>
This will allow us to use the helpers from cta.c.
The functions are marked "static inline" to avoid warnings about
unused functions.
Signed-off-by: Simon Ser <contact@emersion.fr>
The Display Monitor Timing specification is a PDF with data tables.
A small Python script can be used to extract its contents in a
machine-readable form.
For now only extract a few fields. This can be extended later.
Signed-off-by: Simon Ser <contact@emersion.fr>