The only caller skips any descriptor with errors, it doesn't surface
back the errno to the library user.
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 analog/digital flags are left for a future patch.
A join_str() function is introduced in di-edid-decode: upstream
edid-decode uses a comma-separated list with a handful of other
flags.
Signed-off-by: Simon Ser <contact@emersion.fr>
The spec allows manufacturers to store the aspect ratio in these
fields. Instead of exposing bogus values to the user, mark the
size in mm as undefined.
Signed-off-by: Simon Ser <contact@emersion.fr>
The extra underscore indicates that it's not a function which is
part of our public API. This will allow the next commit to setup the
linker to export functions based on their name.
Signed-off-by: Simon Ser <contact@emersion.fr>
The spec defines an upper bound for the extension block count,
which means we don't need to dynamically allocate the array. This
simplifies our logic a bit by removing an allocation error codepath.
The array is NULL-terminated, so EDID_MAX_BLOCK_COUNT is suitable
since it's the max number of extension blocks including the base
block, and the array doesn't include the base block.
Signed-off-by: Simon Ser <contact@emersion.fr>
This is what the specification uses. Makes it easier to compare the
code to the spec.
No functional change, this is purely a cosmetic change.
Signed-off-by: Simon Ser <contact@emersion.fr>
Introduce an opaque struct di_edid to host EDID structures. Add
a function to create a di_edid (with basic size, header and
checksum validation). Add functions to fetch the EDID version and
revision.
This doesn't do much, but hopefully can be used as a fundation.
Signed-off-by: Simon Ser <contact@emersion.fr>