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>
These appear after the basic display parameters and features in
the EDID structure, so it makes sense to put them below in the
header.
I got confused while during a rebase.
While at it, move the declaration for struct di_edid_display_descriptor
before the one for di_edid_get_display_descriptors(), because the
latter uses the former.
Signed-off-by: Simon Ser <contact@emersion.fr>
Upstream edid-decode hides the serial number in this case.
The spec says that it's optional, and set to zero when unused.
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 high-level function leverages the low-level
di_edid_get_vendor_product function to build a string describing
the display device product.
Signed-off-by: Simon Ser <contact@emersion.fr>
This exposes a new di_info opaque struct from which high-level
information will be able to be queried by the user. A new
di_info_parse_edid function creates a di_info from an EDID blob.
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>