Commit graph

7 commits

Author SHA1 Message Date
Simon Ser
7a31791343 edid: add support for product serial, name and data strings
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-06-09 07:28:16 +00:00
Simon Ser
2f8f41ea48 edid: add basic support for display descriptors
Expose an API to list display descriptors. Detailed timing
descriptors are not parsed.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-06-09 07:28:16 +00:00
Simon Ser
6cbaf27c91 edid: switch to a statically allocated extension array
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>
2022-06-02 10:24:28 +02:00
Simon Ser
ef4661147e edid: validate extension block tag
Skip any extension block with an unsupported tag to make sure we don't
return a bogus enum value to the user.

Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/merge_requests/16#note_1396993
2022-05-25 11:32:59 +02:00
Simon Ser
1c0f7497f5 edid: add low-level API to enumerate extension blocks
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-05-09 14:33:58 +02:00
Simon Ser
882d34cebb edid: add vendor and product identification data
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-05-09 14:33:58 +02:00
Simon Ser
ad1e3f4167 Add very basic EDID functions
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>
2022-05-05 16:42:10 +02:00